diff --git a/tests/common.ts b/tests/common.ts index 555239e..ca238b3 100644 --- a/tests/common.ts +++ b/tests/common.ts @@ -2,6 +2,7 @@ import { afterAll, beforeAll, expect, jest } from '@jest/globals' import { readFile } from 'fs/promises' import { join } from 'path' import puppeteer, { ConsoleMessage } from 'puppeteer' + beforeAll(async () => { globalThis.browser = await puppeteer.launch({ args: [ @@ -46,7 +47,7 @@ export const getTestbed = async () => { request.continue() }) - const response = await page.goto(`file://${join(__dirname, './testbed.html')}`) + const response = await page.goto(`file://${join(__dirname, './testbed.html')}`, { timeout: 0 }) expect(response).not.toBeNull() expect(response?.status()).toBe(200) diff --git a/tests/encode.test.ts b/tests/encode.test.ts index 87c8bb2..2a3a9da 100644 --- a/tests/encode.test.ts +++ b/tests/encode.test.ts @@ -84,5 +84,5 @@ describe('encoder', () => { gainMapMax: result.gainMapMax }, null, 2) )) - }, 20000) + }, 50000) }) diff --git a/global.d.ts b/tests/global.d.ts similarity index 100% rename from global.d.ts rename to tests/global.d.ts diff --git a/tests/tsconfig.json b/tests/tsconfig.json new file mode 100644 index 0000000..9f16221 --- /dev/null +++ b/tests/tsconfig.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "strict": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "noErrorTruncation": true, + "noImplicitAny": true, + "noImplicitThis": true, + "allowSyntheticDefaultImports": true, + "esModuleInterop": true, + "moduleResolution": "NodeNext", + "module": "NodeNext", + "target": "ES2015" + } +}