Skip to content

Commit 3cdcb2e

Browse files
authored
feat(rtl): add jest-dom to jest-setup.js (#37)
BREAKING CHANGE: add jest-dom to setupFilesAfterEnv
1 parent 2081eda commit 3cdcb2e

4 files changed

Lines changed: 260 additions & 9 deletions

File tree

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ jest-preset.json
99
# misc
1010
.DS_Store
1111
npm-debug.log
12+
*.tgz
1213

1314
# IDEs
1415
.idea

jest-setup.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@
1212
* the License.
1313
*/
1414

15+
require('@testing-library/jest-dom');
16+
require('whatwg-fetch');
17+
1518
global.requestAnimationFrame = (callback) => {
1619
setTimeout(callback, 0);
1720
};

package-lock.json

Lines changed: 253 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,12 @@
3939
]
4040
},
4141
"dependencies": {
42+
"@testing-library/jest-dom": "^5.16.1",
4243
"amex-jest-preset": "^6.1.0",
4344
"enzyme": "^3.0.0",
4445
"enzyme-adapter-react-16": "^1.7.0",
45-
"identity-obj-proxy": "^3.0.0"
46+
"identity-obj-proxy": "^3.0.0",
47+
"whatwg-fetch": "^3.6.2"
4648
},
4749
"peerDependencies": {
4850
"enzyme-to-json": "^3.0.1",

0 commit comments

Comments
 (0)