From c0e7f439f750e3d9bb9d46a5764c32f54a3cd72e Mon Sep 17 00:00:00 2001 From: GleidsonDaniel Date: Tue, 1 Feb 2022 08:57:50 -0300 Subject: [PATCH] fix build and useless done and async generator --- .circleci/config.yml | 2 +- __tests__/Storyshots.test.js | 11 +++-------- 2 files changed, 4 insertions(+), 9 deletions(-) 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); } });