bahmutov / cyclope

Cypress DOM snapshots and consistent image diffing in the cloud
13 stars 2 forks source link

savePageIfTestFailed on cypress 10 #74

Closed jomarko closed 1 year ago

jomarko commented 2 years ago

I struggle to finish savePageIfTestFailed using cypress ten, especially the snippet for support/index.js causes an issue:

import { savePageIfTestFailed } from 'cyclope'
afterEach(savePageIfTestFailed)

The import from causes this error:

File '/home/jomarko/redhat/smart-events/sandbox-ui/node_modules/cyclope/src/index.d.ts' is not a module.ts(2306)

Do you have any suggestion how to setup cyclope for cypress 10 project?

bahmutov commented 1 year ago

Yes, add ts-ignore comment

// @ts-ignore
import { savePageIfTestFailed } from 'cyclope'