Skip to content
Advertisement

Tag: testing

Issue with setting up jest mock

I have the following function that is used within cypress tests for which I want to do unit testing (filterTests.js): A test double for Cypress.env needs to be created. I’m not sure if this would technically be considered a stub, mock, fake, dummy, etc…, but the philosophical discussion isn’t the focus right now. It looks like in the Cypress world,

Jest coverage tools fail

During in my react-native project, during test execution, Jest shows coverage and creates coverage reports. Jest config: During testing I get errors: in files which are generated during creation of coverage folder: So, in jest documentation we see that we can specify jsdom environment in file which produces error like: Ok, but here we have auto-generated files, not my test-files.

Advertisement