diff --git a/global.d.ts b/global.d.ts new file mode 100644 index 00000000..9e6c1dbd --- /dev/null +++ b/global.d.ts @@ -0,0 +1 @@ +import 'jest-extended'; diff --git a/jest.config.js b/jest.config.js new file mode 100644 index 00000000..ae1c852d --- /dev/null +++ b/jest.config.js @@ -0,0 +1,26 @@ +module.exports = { + preset: 'ts-jest', + + testEnvironment: 'node', + testRegex: 'test\\/.*\\.ts$', + testMatch: null, + testURL: 'http://localhost/', + testTimeout: 15000, + + coverageDirectory: 'coverage', + collectCoverage: true, + + setupFilesAfterEnv: ['jest-extended'], + + moduleNameMapper: { + '^ky$': require.resolve('ky').replace('index.js', 'umd.js'), + }, + + globals: { + 'ts-jest': { + diagnostics: { + ignoreCodes: [2339], + }, + }, + }, +}; diff --git a/jest.config.json b/jest.config.json deleted file mode 100644 index 0fedac97..00000000 --- a/jest.config.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "preset": "ts-jest", - - "testEnvironment": "node", - "testRegex": "test\\/.*\\.ts$", - "testMatch": null, - "testURL": "http://localhost/", - - "coverageDirectory": "./coverage/", - - "setupFilesAfterEnv": ["jest-extended"], - - "globals": { - "ts-jest": { - "diagnostics": { - "ignoreCodes": [2339] - } - } - } -}