chore: tidy things up and fix typos

This commit is contained in:
LuanRT
2022-07-06 23:47:38 -03:00
parent 021a7fd97a
commit 9c97434e5e
5 changed files with 21 additions and 24 deletions

View File

@@ -1,17 +1,18 @@
'use strict';
const Fs = require('fs');
const Innertube = require('../../build/node');
const Innertube = require('../../build/browser');
const { default: NToken } = require('../../lib/deciphers/NToken');
const { default: Signature} = require('../../lib/deciphers/Signature');
const Constants = require('../constants');
// NOTE:
// these tests disable the restricted headers in XMLHttpRequest
// so techinically these tests are not 100% accurate, so they
// really represent a browser-like environment and not necessarily a browser
// i.e. electron, where you could disable this restriction
/**
* Note:
* These tests disable the restricted headers in XMLHttpRequest.
* So technically, they are not 100% accurate and represent browser-like
* environments such as Electron.
*/
describe('YouTube.js Tests', () => {
beforeAll(async () => {
this.session = await new Innertube();
@@ -83,7 +84,7 @@ describe('YouTube.js Tests', () => {
});
/*
// After a lot of testing, I don't think it is possible to download videos in browser
// After a lot of testing, I don't think it is possible to download videos in a browser.
it('Should download video', async () => {
const result = await download(Constants.VIDEOS[1].ID, this.session);
expect(result).toBeTruthy();