forked from pixijs/pixijs
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
36 lines (36 loc) · 1.15 KB
/
jest.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
module.exports = {
testPathIgnorePatterns: ['/node_modules/', '/src/', '/dist/', '/lib/'],
preset: 'ts-jest/presets/js-with-ts',
runner: '@pixi/jest-electron/runner',
testEnvironment: '@pixi/jest-electron/environment',
setupFilesAfterEnv: [
'jest-extended/all',
],
globalSetup: '<rootDir>/scripts/jest/jest-global-setup.ts',
globalTeardown: '<rootDir>/scripts/jest/jest-global-teardown.ts',
transform: {
'\\.worker.ts$': '@pixi/webworker-plugins/lib/jest-transform',
'\\.vert$': 'jest-raw-loader',
'\\.frag$': 'jest-raw-loader',
'\\.wgsl$': 'jest-raw-loader',
},
moduleNameMapper: {
'^worker:(.*)$': '$1',
},
testMatch: ['**/?(*.)+(spec|tests|test).[tj]s?(x)'],
snapshotResolver: '<rootDir>/scripts/jest/jest-snapshot-resolver.js',
globals: {
'ts-jest': {
tsconfig: {
module: 'ESNext',
esModuleInterop: true,
},
diagnostics: false,
},
},
collectCoverageFrom: [
'<rootDir>/src/**/*.ts',
],
coverageDirectory: '<rootDir>/dist/coverage',
testTimeout: 10000
};