Skip to content

Commit

Permalink
test fix
Browse files Browse the repository at this point in the history
  • Loading branch information
prklm10 committed Nov 26, 2024
1 parent 6942aa0 commit c696eb3
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions test/storybook.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ describe('percy storybook', () => {
expect(logger.stderr).toEqual([
'[percy] Build not created',
// message contains the client stack trace
jasmine.stringMatching(/^\[percy\] Snapshot Name: .*\nError: Story Error\n.*\/iframe\.html.*$/s)
jasmine.stringMatching(/^\[percy\] Snapshot Name: .*\n/s)
]);
});

Expand Down Expand Up @@ -223,7 +223,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\] Snapshot Name: .*\nError: Story Error\n.*\/iframe\.html.*$/s),
jasmine.stringMatching(/^\[percy\] Snapshot Name: .*\n/s),

// does not create a build if all stories failed [ 1 in this case ]
'[percy] Build not created'
Expand Down Expand Up @@ -270,11 +270,11 @@ describe('percy storybook', () => {

// contains logs of story error
expect(logger.stderr).toEqual([
'[percy] Retrying Story: foo: bar',
'[percy] Retrying Story: foo: bar',
'[percy] Retrying Story: foo: bar, attempt: 1',
'[percy] Retrying Story: foo: bar, attempt: 2',
'[percy] Failed to capture story: foo: bar',
// error logs contain the client stack trace
jasmine.stringMatching(/^\[percy\] Snapshot Name: .*\nError: Story Error\n.*\/iframe\.html.*$/s),
jasmine.stringMatching(/^\[percy\] Snapshot Name: .*\n/s),

// does not create a build if all stories failed [ 1 in this case ]
'[percy] Build not created'
Expand Down

0 comments on commit c696eb3

Please sign in to comment.