Skip to content

Commit

Permalink
Merge pull request #421 from storybookjs/feat/support-new-error-event
Browse files Browse the repository at this point in the history
support unhandled errors
  • Loading branch information
yannbf committed Jan 23, 2024
2 parents 52487fc + 8fdba11 commit adea508
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/setup-page-script.ts
Expand Up @@ -380,6 +380,11 @@ async function __test(storyId: string): Promise<any> {
reject(new StorybookTestRunnerError(storyId, error.message, logs));
},

unhandledErrorsWhilePlaying: ([error]: Error[]) => {
cleanup(listeners);
reject(new StorybookTestRunnerError(storyId, error.message, logs));
},

storyMissing: (id: string) => {
cleanup(listeners);
if (id === storyId) {
Expand Down

0 comments on commit adea508

Please sign in to comment.