fix build and useless done and async generator
This commit is contained in:
parent
2f7ff43ea0
commit
c0e7f439f7
|
@ -359,7 +359,7 @@ jobs:
|
||||||
- run:
|
- run:
|
||||||
name: Test
|
name: Test
|
||||||
command: |
|
command: |
|
||||||
yarn test
|
yarn test -w 8
|
||||||
|
|
||||||
- run:
|
- run:
|
||||||
name: Codecov
|
name: Codecov
|
||||||
|
|
|
@ -22,18 +22,13 @@ global.Date.now = jest.fn(() => new Date('2019-10-10').getTime());
|
||||||
|
|
||||||
const converter = new Stories2SnapsConverter();
|
const converter = new Stories2SnapsConverter();
|
||||||
|
|
||||||
// Runner
|
|
||||||
initStoryshots({
|
initStoryshots({
|
||||||
asyncJest: true,
|
test: ({ story, context }) => {
|
||||||
test: ({ story, context, done }) => {
|
|
||||||
const snapshotFilename = converter.getSnapshotFileName(context);
|
const snapshotFilename = converter.getSnapshotFileName(context);
|
||||||
const storyElement = story.render();
|
const storyElement = story.render();
|
||||||
const { update, toJSON } = render(storyElement);
|
const { update, toJSON } = render(storyElement);
|
||||||
update(storyElement);
|
update(storyElement);
|
||||||
setTimeout(() => {
|
|
||||||
const json = toJSON();
|
const json = toJSON();
|
||||||
expect(JSON.stringify(json)).toMatchSpecificSnapshot(snapshotFilename);
|
expect(JSON.stringify(json)).toMatchSpecificSnapshot(snapshotFilename);
|
||||||
done();
|
|
||||||
}, 10);
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in New Issue