Open adriancoliba opened 3 years ago
Can this be related to this? https://github.com/buunguyen/topbar/blob/0c337a8b85e278d684d45ffc3b5b53a1de759ecc/topbar.js#L66 Not sure how your setup handle dom & canvas...
@adriancoliba I had the same error in an app created with create-react-app
v5.0.1
.
Solved it by:
jest-canvas-mock
: npm install jest-canvas-mock --save-dev
jest-canvas-mock
in component test file: import 'jest-canvas-mock'
package.json
:
"jest": {
"resetMocks": false
}
Found the solution here.
Hi, I'm trying to test this library with Jest and React Testing Library and could use some help.
RouteLoadingBar.js:
RouteLoadingBar.test.js:
The above test fails rendering TopBarProgress with the following error:
I would like to mention that I've tried adding "shadowBlur" prop to the config but the test still failed.
Could upgrading "topbar" library solve this?