Skip to content

Commit

Permalink
test: update expectations for storyErrored event
Browse files Browse the repository at this point in the history
  • Loading branch information
nilshah98 committed Oct 31, 2023
1 parent d55f7c0 commit 254b326
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/storybook.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -156,12 +156,12 @@ describe('percy storybook', () => {

await expectAsync(storybook(['http://localhost:8000']))
// message contains the client stack trace
.toBeRejectedWithError(/^Story Error\n.*\/iframe\.html.*$/s);
.toBeRejectedWithError(/^Story Errored\n.*\/iframe\.html.*$/s);

expect(logger.stderr).toEqual([
'[percy] Build not created',
// message contains the client stack trace
jasmine.stringMatching(/^\[percy\] Error: Story Error\n.*\/iframe\.html.*$/s)
jasmine.stringMatching(/^\[percy\] Error: Story Errored\n.*\/iframe\.html.*$/s)
]);
});

Expand Down Expand Up @@ -191,7 +191,7 @@ describe('percy storybook', () => {
expect(logger.stderr).toEqual([
'[percy] Failed to capture story: foo: bar',
// error logs contain the client stack trace
jasmine.stringMatching(/^\[percy\] Error: Story Error\n.*\/iframe\.html.*$/s),
jasmine.stringMatching(/^\[percy\] Error: Story Errored\n.*\/iframe\.html.*$/s),
// does not create a build if all stories failed [ 1 in this case ]
'[percy] Build not created'
]);
Expand Down

0 comments on commit 254b326

Please sign in to comment.