generated from stagas/ts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
jest.config.js
38 lines (34 loc) · 929 Bytes
/
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
module.exports = {
testEnvironment: 'node', // or 'jsdom'
rootDir: 'src',
testMatch: ['**/*.spec.{js,jsx,ts,tsx}'],
coverageDirectory: '../coverage',
// enable this for real typescript builds (slow but accurate)
// preset: 'ts-jest',
// enable this for fast, correct sourcemaps but not all features supported
// transform: {
// '\\.(js|jsx|ts|tsx)$': [
// '@stagas/sucrase-jest-plugin',
// {
// jsxPragma: 'h',
// jsxFragmentPragma: 'Fragment',
// production: true,
// disableESTransforms: true,
// },
// ],
// },
// enable this for fast, incorrect sourcemaps but more features supported
transform: {
'\\.(js|jsx|ts|tsx)$': [
'@swc-node/jest',
{
experimentalDecorators: true,
emitDecoratorMetadata: true,
react: {
pragma: 'h',
pragmaFrag: 'Fragment',
},
},
],
},
}