-
Notifications
You must be signed in to change notification settings - Fork 1
/
jest.config.ts
57 lines (54 loc) · 1.36 KB
/
jest.config.ts
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
53
54
55
56
57
import type { Config } from '@jest/types';
const baseConfig: Config.InitialOptions = {
coveragePathIgnorePatterns: ['/node_modules/', '/dist/'],
snapshotFormat: {
printBasicPrototype: false,
},
transform: {
'^.+\\.(ts|js)(x)?$': [
'@swc-node/jest',
{
jsc: {
minify: false,
},
},
],
},
};
const config: Config.InitialOptions = {
coverageProvider: 'v8',
coverageReporters: ['text'],
testPathIgnorePatterns: ['/fixtures'],
projects: [
{
...baseConfig,
displayName: 'rosette',
testEnvironment: 'jsdom',
testRegex: 'packages/rosette/src/__tests__/.*\\.test\\.ts(x)?$',
},
{
...baseConfig,
displayName: 'rosette-core',
testEnvironment: 'jsdom',
testRegex: 'packages/rosette-core/src/__tests__/.*\\.test\\.ts(x)?$',
},
{
...baseConfig,
displayName: 'rosette-radspec',
testEnvironment: 'jsdom',
testRegex: 'packages/rosette-radspec/src/__tests__/.*\\.test\\.ts(x)?$',
},
{
...baseConfig,
displayName: 'rosette-react',
testEnvironment: 'jsdom',
testRegex: 'packages/rosette-react/src/__tests__/.*\\.test\\.ts(x)?$',
},
],
reporters: ['default', 'github-actions'],
watchPlugins: [
'jest-watch-typeahead/filename',
'jest-watch-typeahead/testname',
],
};
module.exports = config;