diff --git a/.circleci/config.yml b/.circleci/config.yml index 9b681e2b..ac5e942a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -359,7 +359,7 @@ jobs: - run: name: Test command: | - yarn test + yarn test -w 8 - run: name: Codecov diff --git a/__tests__/Storyshots.test.js b/__tests__/Storyshots.test.js index e0d741e1..1315f9bb 100644 --- a/__tests__/Storyshots.test.js +++ b/__tests__/Storyshots.test.js @@ -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); } });