We recently implemented cypress 9.3.1 into our project for end-to-end testing. However, we are encountering an issue where our existing jest tests are not compiling in the CI pipeline.
All parameterized tests are showing the following error:
Property 'each' does not exist on type 'TestFunction'.
it.each<TestCase>([
Question: How can this be resolved?
Attempts that have been made but did not resolve the issue:
Adding
to each test file. A similar problem (Property 'toBeTruthy' does not exist on type 'Assertion') was fixed by addingimport { it } from '@jest/globals'
to each test. Reference:import { expect } from '@jest/globals'
Implementing a project-wide exclusion for cypress globals by including
in the"exclude": ["cypress/global.d.ts"]
tsconfig.spec.json
file