Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Merge pull request #48 from storybookjs/next
Browse files Browse the repository at this point in the history
Release 0.2.3
  • Loading branch information
yannbf authored Oct 4, 2023
2 parents f3ade1e + 415f6d3 commit 9897adf
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ const expect = instrument(
{ intercept: (_method, path) => path[0] !== 'expect' }
).expect as unknown as Expect;

expect.extend(matchers);

// This is a workaround needed for CJS/ESM interop, to make both Vite and Webpack work, in CJS and ESM, without warnings.
const name = 'default' // we need to trick Webpack, this is how 🎉
expect.extend(matchers?.[name] ?? matchers);

export { expect, jest };

0 comments on commit 9897adf

Please sign in to comment.