We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 82fc82c commit 54f2344Copy full SHA for 54f2344
jest.config.ts
@@ -133,7 +133,7 @@ export default {
133
// setupFiles: [],
134
135
// A list of paths to modules that run some code to configure or set up the testing framework before each test
136
- // setupFilesAfterEnv: [],
+ setupFilesAfterEnv: ['./src/test/jest-setup.js'],
137
138
// The number of seconds after which a test is considered as slow and reported as such in the results.
139
// slowTestThreshold: 5,
src/test/jest-setup.js
@@ -0,0 +1,4 @@
1
+import React from 'react'
2
+// whatever else you need in here
3
+
4
+global.React = React
0 commit comments