Skip to content

Commit 781320a

Browse files
committed
fix: set the pixel threshold to 0.08
1 parent 68b314f commit 781320a

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

test/video.test.ts

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,16 @@ import { launchPage, closePage, prepareSvg, generateImage } from '../src/video';
22
import { puppeteer } from 'chrome-aws-lambda';
33
import { LaunchOptions } from 'puppeteer';
44
import fs from 'fs-extra';
5-
import { toMatchImageSnapshot } from 'jest-image-snapshot';
5+
import {
6+
toMatchImageSnapshot,
7+
configureToMatchImageSnapshot,
8+
} from 'jest-image-snapshot';
9+
10+
configureToMatchImageSnapshot({
11+
customDiffConfig: {
12+
threshold: 0.08,
13+
},
14+
});
615

716
expect.extend({ toMatchImageSnapshot });
817

0 commit comments

Comments
 (0)