-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjest.config.js
More file actions
32 lines (28 loc) · 825 Bytes
/
jest.config.js
File metadata and controls
32 lines (28 loc) · 825 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
31
32
/** @type {import('jest').Config} */
module.exports = {
testEnvironment: 'jsdom',
setupFilesAfterEnv: ['<rootDir>/tests/js/setup.js'],
testMatch: ['<rootDir>/tests/js/**/*.test.js'],
// Transform ES modules in js/src/ using Babel
transform: {
'^.+\\.js$': 'babel-jest',
},
// Don't transform node_modules (default behavior)
transformIgnorePatterns: [
'/node_modules/',
],
// Module path mapping for @/ alias to js/src/
moduleNameMapper: {
'^@/(.*)$': '<rootDir>/js/src/$1',
},
collectCoverageFrom: [
'js/**/*.js',
'!js/**/*.min.js',
'!js/watcher.js', // Exclude bundled output
'!js/watcher.min.js', // Exclude minified bundle
],
coverageDirectory: 'tests/js-coverage',
coverageReporters: ['text', 'html', 'lcov'],
verbose: true,
testTimeout: 10000
};