Skip to content

Commit

Permalink
test: fix case where storybook had not loaded yet for live url testing
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshah98 committed Oct 25, 2023
1 parent c23158d commit 0076956
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/storybook.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ describe('percy storybook', () => {
it('snapshots live urls', async () => {
await storybook(['http://localhost:9000']);

expect(logger.stderr).toEqual([]);
// if there are stderr logs ensure it is only an acceptable warning
expect(logger.stderr).toEqual(logger.stderr.length ? [
'[percy] Waiting on a response from Storybook...'
] : []);

expect(logger.stdout).toEqual(jasmine.arrayContaining([
'[percy] Percy has started!',
'[percy] Snapshot taken: Snapshot: First',
Expand Down

0 comments on commit 0076956

Please sign in to comment.