-
Notifications
You must be signed in to change notification settings - Fork 129
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
Test failed with: Cannot set property 'font' of null #111
Comments
Same here, any fix or workaround? |
The issue is that Installing the jest-canvas-mock package will add the missing support. npm install -D jest-canvas-mock Then create a new (or amend) ${rootDir}/src/setupTests.js with import 'jest-canvas-mock'; This fixed the issue for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I am trying to write a test for a component. when the value of
width
props is set, test get failed// passed test
// failed test
this is the error message
TypeError: Cannot set property 'font' of null
The text was updated successfully, but these errors were encountered: