Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

addMatchImageSnapshotCommand: Argument of type '{ customDiffConfig: { threshold: number; }; }' is not assignable to parameter of type 'string'.ts #210

Open
edouard-lopez opened this issue Jul 22, 2021 · 0 comments

Comments

@edouard-lopez
Copy link

package.json

{
	"cypress": "^8.0.0",
	"cypress-image-snapshot": "^4.0.1",
	"typescript": "^4.1.5",
}

cypress/support/commands/snapshot.ts

import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';

addMatchImageSnapshotCommand({
  customDiffConfig: { threshold: 0.15 }, // threshold for each pixel
});

Documentation

The readme show it's a possible usage:

addMatchImageSnapshotCommand(options);

Error

VSCode show me this error message, despite the documentation

Argument of type '{ customDiffConfig: { threshold: number; }; }' is not assignable to parameter of type 'string'.ts(2345)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant