sofn-xyz / mailing

Build, test, send emails with React
https://www.mailing.run
MIT License
3.6k stars 74 forks source link

jest tests have version of `expect` that is clobbered by cypress instead of expected jest version #411

Closed alexfarrill closed 1 year ago

alexfarrill commented 1 year ago

Example of typescript error in jest test: property 'toHaveBeenCalledWith' does not exist on type 'Assertion'. ts(2339)

image

The tsconfig change in 4fe6211ac72de5ed2e9f1e7c78913a9fba76fb4e is related

Expected behavior:

image

Related googles:

i think cypress like clobbers the ones from jest if you put import { expect } from "@jest/globals"; at the start of test files it fixes the issue