File tree Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Expand file tree Collapse file tree 3 files changed +8
-10
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,10 @@ module.exports = {
11
11
} ,
12
12
} ,
13
13
modulePathIgnorePatterns : [
14
- 'cypress'
15
- ]
14
+ 'cypress' ,
15
+ ] ,
16
+ setupFilesAfterEnv : [
17
+ 'jest-extended' ,
18
+ './jest.setup.js' ,
19
+ ] ,
16
20
} ;
Original file line number Diff line number Diff line change 1
- import fetch from 'node-fetch' ;
1
+ const fetch = require ( 'node-fetch' ) ;
2
2
3
3
/**
4
4
* @see https://github.com/vercel/next.js/discussions/13678 How to use built-in fetch in tests?
@@ -8,4 +8,4 @@ import fetch from 'node-fetch';
8
8
// Polyfill "fetch" for node.js, so that our tests may replicate the built-in "fetch" provided by Next.js
9
9
global . fetch = fetch ;
10
10
11
- console . info ( 'Jest env has been enhanced - See "./jest.setup.js"' )
11
+ console . info ( 'Jest env has been enhanced - See "./jest.setup.js"' ) ;
Original file line number Diff line number Diff line change 44
44
"security:audit" : " yarn audit" ,
45
45
"packages:upgrade" : " yarn upgrade-interactive --latest"
46
46
},
47
- "jest" : {
48
- "setupFilesAfterEnv" : [
49
- " jest-extended" ,
50
- " ./jest.setup.js"
51
- ]
52
- },
53
47
"dependencies" : {
54
48
"@amplitude/react-amplitude" : " 1.0.0" ,
55
49
"@emotion/core" : " 10.0.28" ,
You can’t perform that action at this time.
0 commit comments