-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathjest.config.js
More file actions
30 lines (30 loc) · 802 Bytes
/
jest.config.js
File metadata and controls
30 lines (30 loc) · 802 Bytes
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
export default {
preset: 'ts-jest',
testEnvironment: 'jsdom',
moduleFileExtensions: ['js', 'ts', 'svelte'],
transform: {
'^.+\\.svelte$': [
'svelte-jester',
{
preprocess: true
}
],
'^.+\\.ts$': 'ts-jest',
'^.+\\.js$': 'babel-jest'
},
transformIgnorePatterns: ['node_modules/(?!(@testing-library/svelte)/)'],
moduleNameMapper: {
'^\\$lib(.*)$': '<rootDir>/src/lib$1',
'^\\$app(.*)$': '<rootDir>/src/app.d.ts',
'\\.(css|less|scss|sass)$': 'identity-obj-proxy'
},
testMatch: ['**/__tests__/**/*.test.ts', '**/__tests__/**/*.test.js'],
collectCoverageFrom: [
'src/**/*.{ts,svelte}',
'!src/**/*.d.ts',
'!src/app.html',
'!src/service-worker.ts'
],
setupFilesAfterEnv: ['<rootDir>/jest.setup.js'],
testPathIgnorePatterns: ['/node_modules/', '/.svelte-kit/']
};