Property 'toEqual' does not exist on type 'Assertion'
cypress를 도입하면서, jest의 toEqual 프로퍼티를 찾지 못하는 현상이 발생하였습니다.
javascripttesting
현상
cypress를 도입하면서, jest의 toEqual 프로퍼티를 찾지 못하는 현상이 발생하였습니다.

원인
- 사용된 expect가 예상과는 달랐습니다.

- 서치해보니, cypress v10과 jest의 expect를 동시 사용시에 충돌이 발생한다고 합니다. https://github.com/cypress-io/cypress/issues/22059#issuecomment-1148921141 (github.com, 새 창)
해결
첫번째 방법 : @jest/globals에서 expect를 import 해오기
import { expect } from '@jest/globals';두번째 방법 : tsconfig.json에서 cypress.config.ts를 제외 설정해주기
"exclude": [
"./cypress.config.ts",
//other exclusions that may help https://github.com/cypress-io/cypress/issues/22059#issuecomment-1428298264
"node_modules",
"cypress",
"**/*.cy.tsx"
]