We have introduced cypress 9.3.1 in our project for e2e test. Now we face the problem that our existing jest test don't compile in the CI.
The following error occures for all parameterized tests:
Property 'each' does not exist on type 'TestFunction'.
it.each<TestCase>([
Question: How to fix it?
What we tried and did't work:
Adding
import { it } from '@jest/globals'
to every test. We where able to fix a similar problem (Property 'toBeTruthy' does not exist on type 'Assertion') by addingimport { expect } from '@jest/globals'
to every test. See: https://stackoverflow.com/a/65153905Adding a project wide exclusion for cypress globals, by adding
"exclude": ["cypress/global.d.ts"]
to thetsconfig.spec.json