We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f77bdd1 commit 96783fdCopy full SHA for 96783fd
jest.config.js
@@ -1,3 +1,7 @@
1
+const path = require('path')
2
+
3
+const here = (...p) => path.join(__dirname, ...p)
4
5
module.exports = {
6
transform: {
7
'^.+\\.jsx?$': `<rootDir>/tests/jest-preprocess.js`,
@@ -12,5 +16,5 @@ module.exports = {
12
16
__PATH_PREFIX__: ``,
13
17
},
14
18
testURL: `http://localhost`,
15
- setupFilesAfterEnv: ['@testing-library/jest-dom/extend-expect'],
19
+ setupFilesAfterEnv: [here('./tests/setup')],
20
}
tests/setup.js
@@ -0,0 +1,2 @@
+import '@testing-library/jest-dom/extend-expect'
+process.env.NODE_ENV = 'test'
0 commit comments