-
-
Notifications
You must be signed in to change notification settings - Fork 9
/
jest.config.js
35 lines (34 loc) · 944 Bytes
/
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
const ignores = ['/node_modules/', '__mocks__'];
module.exports = {
testMatch: ['**/__test/**/*.spec.+(ts|tsx|js)'],
testPathIgnorePatterns: [...ignores],
coveragePathIgnorePatterns: [...ignores, 'src/(umd|cjs|esm)-entry.js$'],
transformIgnorePatterns: ['[/\\\\]node_modules[/\\\\].+\\.(js|jsx)$'],
coverageDirectory: './coverage',
coverageThreshold: {
global: {
branches: 80,
functions: 100,
lines: 100,
statements: 100,
},
"./src/components/**/*.svelte": { // *.svelte test coverage always results 0 percent for "Branch"
functions: 100,
lines: 100,
statements: 100,
},
},
moduleFileExtensions: ['ts', 'tsx', 'js', 'svelte'],
transform: {
'^.+\\.svelte$': [
"svelte-jester",
{
"preprocess": true
}
],
'^.+\\.(ts|tsx)$': 'ts-jest',
'^.+\\.js$': 'babel-jest',
},
verbose: true,
setupFilesAfterEnv: ['./jest.setup.js']
};