-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathjest.config.js
40 lines (36 loc) · 1007 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
39
40
module.exports = {
preset: '@metamask/snaps-jest',
// Since `@metamask/snaps-jest` runs in the browser, we can't collect
// coverage information.
collectCoverage: false,
// "resetMocks" resets all mocks, including mocked modules, to jest.fn(),
// between each test case.
resetMocks: true,
// "restoreMocks" restores all mocks created using jest.spyOn to their
// original implementations, between each test. It does not affect mocked
// modules.
restoreMocks: true,
// A map from regular expressions to paths to transformers
transform: {
'^.+\\.(t|j)sx?$': [
'@swc/jest',
{
jsc: {
target: 'es2022',
parser: {
syntax: 'typescript',
tsx: true,
},
transform: {
react: {
runtime: 'automatic',
importSource: '@metamask/snaps-sdk',
useBuiltins: true,
},
},
},
sourceMaps: false,
},
],
},
};