mirror of
https://github.com/snobu/destreamer.git
synced 2026-01-17 05:22:18 +00:00
Add mid-download token refresh, fix headers length overflow bug (#93)
* Add mid-download token refresh and header size fix for Node v8 * Refactor puppeteer test * Remove note on mid-download token refresh bug * Add source maps to build step * Fix npm build script
This commit is contained in:
22
test/test.ts
22
test/test.ts
@@ -7,28 +7,20 @@ import fs from 'fs';
|
||||
let browser: any;
|
||||
let page: any;
|
||||
|
||||
before(async () => {
|
||||
browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
args: ['--disable-dev-shm-usage']
|
||||
});
|
||||
page = await browser.newPage();
|
||||
});
|
||||
|
||||
describe('Puppeteer', () => {
|
||||
it('should grab GitHub page title', async () => {
|
||||
await page.goto("https://github.com/", { waitUntil: 'networkidle2' });
|
||||
browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
args: ['--disable-dev-shm-usage']
|
||||
});
|
||||
page = await browser.newPage();
|
||||
await page.goto("https://github.com/", { waitUntil: 'load' });
|
||||
let pageTitle = await page.title();
|
||||
assert.equal(true, pageTitle.includes('GitHub'));
|
||||
|
||||
await browser.close();
|
||||
}).timeout(15000); // yeah, this may take a while...
|
||||
});
|
||||
|
||||
after(async () => {
|
||||
await browser.close();
|
||||
});
|
||||
|
||||
|
||||
describe('Destreamer', () => {
|
||||
it('should parse and sanitize URL list from file', () => {
|
||||
const testIn: string[] = [
|
||||
|
||||
Reference in New Issue
Block a user