Closed karlhorky closed 9 months ago
This issue is stale because it has been open for 30 days with no activity.
not stale
This issue is stale because it has been open for 30 days with no activity.
not stale
not stale
This issue is stale because it has been open for 30 days with no activity.
Not stale
I was able to solve this error while we wait for the release of version 2.0 in the following way:
First I created the following file cypress/support/commands-patch.js (note that the extension is .js and not .ts)
import compareSnapshotCommand from 'cypress-image-diff-js/dist/command';
export default compareSnapshotCommand;
Second I added the following in the cypress/support/commands.ts file
import compareSnapshotCommand from './commands-patch';
compareSnapshotCommand();
Finally, it is necessary to add this option to the tsconfig.ts file for this to work
{
"compilerOptions": {
...
"allowJs": true,
}
}
can you try the following Typescript guide?
This issue should be fixed after this pull request #195. Please upgrade to the latest version and see if the error still persists. I have created some integration examples here in case you want a reference.
When creating #130 I found that the types are missing for this
cypress-image-diff-js/dist/command
path that should be imported:Maybe these types could also be published so that #130 could also be merged?