New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature] Release version with Jest 28 #20
Comments
Can we include this in Storybook 7.0? Test-runner has already been updated to support Jest 28. Do you need any help? |
Is there any workaround in the mean time until we wait for an update? |
I've opened storybookjs/expect#12. This |
Thanks for pushing storybookjs/expect#12 across the line, @ghengeveld! What remains to do here to pull it in? In the meantime, I suppose we can use overrides in our package.json to start using it and testing it out (pun intended). |
Hey @IanVS! There were some issues in that version which we fixed (jest-util is not that browser friendly), so we made a
|
You bring up good points, I'll give it some thought. Off the cuff, I'll say that I see the global polyfill as a workaround, not a permanent solution. Vite does not polyfill node globals, so therefore right now it's possible for stories to work fine if they use I did try using an
That's too bad, I wish we would have taken care of this before storybook 7's release. I was quite looking forward to removing the |
I guess this can be closed, now that 0.2.0 includes jest 28, right? |
It still uses 27 from |
@kasperpeulen it looks like it also uses |
@IanVS The new version of this library will update |
🙌 Now we just have to figure out jest-mock, I guess. |
For now, when I need mocks, I'm using jest-mock 28 directly, and using: import { ModuleMocker } from 'jest-mock';
const mock = new ModuleMocker(window); And that's working fine in my stories. |
Now that the test-runner will soon support jest 28, it would be great to have a new version of
@storybook/jest
(and@storybook/expect
) that also use jest 28 as well, to avoid the problems that jest 27 has with usingglobal
, making it difficult to run in the browser.The text was updated successfully, but these errors were encountered: