-
Notifications
You must be signed in to change notification settings - Fork 35
/
Copy pathjest.config.js
52 lines (51 loc) · 1.19 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/** @type {import('jest').Config} */
module.exports = {
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
module: {
type: 'es6',
// These are defaults.
strict: false,
strictMode: true,
lazy: false,
noInterop: false,
preserveImportMeta: true,
},
jsc: {
baseUrl: '.',
paths: {
'@/*': ['./packages/sku/src/*'],
},
},
},
],
},
...(process.env.CI
? {
maxWorkers: 4,
}
: {}),
preset: 'jest-puppeteer',
moduleNameMapper: {
'(.+)\\.js': '$1',
},
setupFilesAfterEnv: ['<rootDir>/test-utils/jestSetup.ts'],
snapshotSerializers: [
'<rootDir>/test-utils/appSnapshotSerializer.cjs',
'<rootDir>/test-utils/htmlSnapshotSerializer.cjs',
'<rootDir>/test-utils/cssSnapshotSerializer.cjs',
],
extensionsToTreatAsEsm: ['.ts'],
testPathIgnorePatterns: [
'/node_modules/',
'<rootDir>/packages/sku/scripts/test.js',
'<rootDir>/fixtures/.*',
'<rootDir>/tests/sku-init/sku-init.test.js',
],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};