What can I do about this error: ReferenceError: MutationObserver is not defined #1958
Answered
by
keiya01
REDLIGHTFILMS
asked this question in
Q&A
-
So I work with the "react-testing-library" and I have already done this: "npm i mutationobserver-shim" and it still throws the error. This is my code:
This is my package-json:
This is the Code with the data-testid:
What can I do? How can I correct this error? |
Beta Was this translation helpful? Give feedback.
Answered by
keiya01
Jun 25, 2020
Replies: 1 comment 10 replies
-
I think you have to import |
Beta Was this translation helpful? Give feedback.
10 replies
Answer selected by
keiya01
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think you have to import
mutationobserver-shim
.If you are using
jest
, refer the following URL.https://jestjs.io/docs/en/configuration#setupfiles-array