BREAKING: ESM only, Support for Storybook 10 and Jest 30#571
Conversation
55459a1 to
6833c21
Compare
…able module type, and upgrade Jest and SWC dependencies. Adjust Playwright setup for ESM compatibility and clean up TypeScript ignore comments across multiple files.
…ot test comments for clarity.
…e, and add Vitest configuration. Update test files to use Vitest instead of Jest, including snapshot updates and async test handling. Adjust Playwright and Storybook integration for improved compatibility.
545c0fd to
fe87de1
Compare
…t-preset Remove jest-playwright-preset dependency and support Jest 30
Sidnioulz
left a comment
There was a problem hiding this comment.
Had to monkey patch a few things, but then got tests to pass on a fresh Nextjs x Turbopack repo.
Watch mode works, tests pass and fail when expected.
I'll give more feedback later as I'm battling with Istambul to test coverage.
|
Not sure if these are known issues or SB10 regressions, but the follow test-runner features don't work: This seems to be something Jest is responsible for rather than Playwright. Has anything changed within Jest that could be relevant here?
|
Sidnioulz
left a comment
There was a problem hiding this comment.
Ejecting does not work (import path to fix).
Once the path is fixed, config overrides work. I can change the list of files to treat as ESM or the transform functions.
|
@jasikpark @IanVS This is the PR we're going to go for for SB10, can you assist testing this? This is the canary version of this PR: 🙏 |
|
I see you are working on v10 support here, if it helps, tests are failing on v10: https://github.com/argos-ci/argos-javascript/actions/runs/18688211014/job/53286617759?pr=240 |
|
@gregberge it would probably be good to open an issue to report this problem, and share any relevant config there. |
I think it's very much relevant to this PR. @yannbf has removed the
As we're moving to ESM only, do we still support our callees writing CJS code and importing us in CJS codebases? If so, we might need to preserve the sync |
|
@yannbf can we add back the synchronous process? Nevermind, it was because the source code was in JS and not TS. I migrated on TS and it's fixed. |

Closes #
What I did
This PR refactors the test-runner so it doesn't use jest-playwright-preset directly, allowing it to support Jest 30.
Additionally it adds support for Storybook 10, and as a requirement it becomes ESM only, therefore having breaking changes. It will only support Storybook 10 and higher
Checklist for Contributors
Manual testing
npx storybook@next initnpm install --save-dev @storybook/test-runner@0.23.1--canary.af6bf62.0npm run test-storybookworks as intendedDocumentation
Checklist for Maintainers
Make sure this PR contains one of the labels below:
Available labels
skip-release: Skip any releases, e.g., documentation only changes, CI config etc.patch: Upgrade patch version (e.g. 0.0.x)minor: Upgrade patch version (e.g. 0.x.0)major: Upgrade patch version (e.g. x.0.0)