Skip to content

Commit 2bed613

Browse files
author
Ives van Hoorne
committed
Use custom threshold for apollo sandbox
1 parent 17e8960 commit 2bed613

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

integration-tests/tests/sandboxes.test.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const SANDBOXES = [
77
'svelte',
88
'react-ts',
99
'github/reactjs/redux/tree/master/examples/todomvc',
10-
'jvlrl98xw3',
10+
{ id: 'jvlrl98xw3', threshold: 0.05 },
1111
'vVoQVk78',
1212
'github/faceyspacey/redux-first-router-codesandbox/tree/master',
1313
'mZRjw05yp',
@@ -20,6 +20,7 @@ const SANDBOXES = [
2020
SANDBOXES.forEach(sandbox => {
2121
const id = sandbox.id || sandbox;
2222
const root = sandbox.root || '#root';
23+
const threshold = sandbox.threshold || 0.01;
2324
let browser = puppeteer.launch({
2425
args: ['--no-sandbox', '--disable-setuid-sandbox'],
2526
});
@@ -45,7 +46,7 @@ SANDBOXES.forEach(sandbox => {
4546

4647
expect(screenshot).toMatchImageSnapshot({
4748
customDiffConfig: {
48-
threshold: 0.01, // 1% threshold
49+
threshold,
4950
},
5051
customSnapshotIdentifier: id.split('/').join('-'),
5152
});

0 commit comments

Comments
 (0)