-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Jest Snapshot Test Failure: Cannot read property 'getContext' of null #15
Comments
I get a similar issue when attempting to render my app.
I think this is related to a need for mocking the canvas, as Jest uses JSDom to "render" the components. |
Doing a little more research I found that jsdom does have support for canvas via an external package. Installing canvas or canvas-prebuilt as a dependency allowed it to work for me. |
@danielcooperxyz I added |
|
Did you get your issue resolved ?? If yes , please help me. I am getting the same error working on React testing using Jest. |
Error:
The text was updated successfully, but these errors were encountered: