mirror of
https://github.com/mermaid-js/mermaid.git
synced 2025-08-22 17:56:43 +02:00
Use pixelmatch for image comparison
This commit is contained in:
@@ -102,6 +102,7 @@
|
|||||||
"pathe",
|
"pathe",
|
||||||
"pbrolin",
|
"pbrolin",
|
||||||
"phpbb",
|
"phpbb",
|
||||||
|
"pixelmatch",
|
||||||
"plantuml",
|
"plantuml",
|
||||||
"playfair",
|
"playfair",
|
||||||
"pnpm",
|
"pnpm",
|
||||||
|
@@ -26,12 +26,16 @@
|
|||||||
|
|
||||||
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
import { addMatchImageSnapshotCommand } from 'cypress-image-snapshot/command';
|
||||||
|
|
||||||
addMatchImageSnapshotCommand({
|
// The SSIM comparison method can be used if the pixelmatch is throwing lots of false positives.
|
||||||
comparisonMethod: 'ssim',
|
// SSIM actually does not catch minute changes in the image, so it is not as accurate as pixelmatch.
|
||||||
failureThreshold: 0.01,
|
// addMatchImageSnapshotCommand({
|
||||||
failureThresholdType: 'percent',
|
// comparisonMethod: 'ssim',
|
||||||
customDiffConfig: {
|
// failureThreshold: 0.01,
|
||||||
ssim: 'fast',
|
// failureThresholdType: 'percent',
|
||||||
},
|
// customDiffConfig: {
|
||||||
blur: 1,
|
// ssim: 'fast',
|
||||||
});
|
// },
|
||||||
|
// blur: 1,
|
||||||
|
// });
|
||||||
|
|
||||||
|
addMatchImageSnapshotCommand();
|
||||||
|
Reference in New Issue
Block a user