Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ jobs:
- run:
name: Test
command: |
yarn test
yarn test -w 8

- run:
name: Codecov
Expand Down
11 changes: 3 additions & 8 deletions __tests__/Storyshots.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,18 +22,13 @@ global.Date.now = jest.fn(() => new Date('2019-10-10').getTime());

const converter = new Stories2SnapsConverter();

// Runner
initStoryshots({
asyncJest: true,
test: ({ story, context, done }) => {
test: ({ story, context }) => {
const snapshotFilename = converter.getSnapshotFileName(context);
const storyElement = story.render();
const { update, toJSON } = render(storyElement);
update(storyElement);
setTimeout(() => {
const json = toJSON();
expect(JSON.stringify(json)).toMatchSpecificSnapshot(snapshotFilename);
done();
}, 10);
const json = toJSON();
expect(JSON.stringify(json)).toMatchSpecificSnapshot(snapshotFilename);
}
});
Loading