Skip to content

Commit

Permalink
test: make before-each story more resilient
Browse files Browse the repository at this point in the history
  • Loading branch information
leosvelperez committed Nov 19, 2024
1 parent ac4635c commit 1f47b68
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion code/lib/test/template/stories/before-each.stories.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ export const BeforeEachOrder = {
async play({ canvasElement }: any) {
await userEvent.click(getByRole(canvasElement, 'button'));

await expect(mocked(console.log).mock.calls).toEqual([
const allLogs = mocked(console.log).mock.calls.filter(([message]) => /^\d+ - /.test(message));
await expect(allLogs).toEqual([
['1 - [from loaders]'],
['2 - [from meta beforeEach]'],
['3 - [from story beforeEach]'],
Expand Down

0 comments on commit 1f47b68

Please sign in to comment.