Skip to content

Commit 55d40eb

Browse files
committed
introduce Storybook Storyshots with Visual Regression Test
1 parent a1890a3 commit 55d40eb

File tree

4 files changed

+7
-26
lines changed

4 files changed

+7
-26
lines changed
6.75 KB
Loading
6.54 KB
Loading

src/__snapshots__/App.snapshot.js.snap

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -28,27 +28,3 @@ exports[`Counter Snapshot renders 1`] = `
2828
1
2929
</p>
3030
`;
31-
32-
exports[`Storyshots Checkbox with checked 1`] = `
33-
<label>
34-
My Checkbox Label
35-
:
36-
<input
37-
checked={true}
38-
onChange={[Function]}
39-
type="checkbox"
40-
/>
41-
</label>
42-
`;
43-
44-
exports[`Storyshots Checkbox with unchecked 1`] = `
45-
<label>
46-
My Checkbox Label
47-
:
48-
<input
49-
checked={false}
50-
onChange={[Function]}
51-
type="checkbox"
52-
/>
53-
</label>
54-
`;

test/jest.setup.js

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1-
import initStoryshots from '@storybook/addon-storyshots';
1+
import initStoryshots, { imageSnapshot } from '@storybook/addon-storyshots';
22

3-
initStoryshots();
3+
initStoryshots({
4+
suite: 'Storyshots',
5+
test: imageSnapshot({
6+
storybookUrl: 'http://localhost:9001',
7+
}),
8+
});

0 commit comments

Comments
 (0)