-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathjest.config.mjs
More file actions
29 lines (29 loc) · 836 Bytes
/
jest.config.mjs
File metadata and controls
29 lines (29 loc) · 836 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
export default {
moduleDirectories: ['node_modules', 'app/javascript'],
moduleFileExtensions: ['js'],
automock: false,
resetMocks: true,
cacheDirectory: '<rootDir>/.jest-cache',
collectCoverage: true,
coverageDirectory: 'coverage/frontend',
coverageReporters: ['text', 'lcov'],
collectCoverageFrom: [
'<rootDir>/app/javascript/**/*.js',
'!<rootDir>/app/javascript/scripts/govuk_assets_import.js'
],
reporters: ['default'],
transformIgnorePatterns: ['node_modules/*'],
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/app/javascript/$1'
},
roots: ['app/javascript'],
testEnvironment: 'jsdom',
testMatch: ['**/app/javascript/**/*.spec.js'],
testEnvironmentOptions: {
url: 'http://localhost/'
},
testPathIgnorePatterns: [],
transform: {
'^.+\\.jsx?$': 'esbuild-jest-transform'
}
}