Skip to content
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

[Bug]: Remove ES2017 transpilation limitation when using mount #29202

Open
kasperpeulen opened this issue Sep 25, 2024 · 0 comments
Open

[Bug]: Remove ES2017 transpilation limitation when using mount #29202

kasperpeulen opened this issue Sep 25, 2024 · 0 comments

Comments

@kasperpeulen
Copy link
Contributor

At this moment, you can only use mount in the play function if you transpile your stories to ES2017 or newer:
https://storybook.js.org/docs/writing-tests/component-testing#run-code-before-the-component-gets-rendered

Angular can not use ES2017 (specifically: async/await) natively if zone.js is used
https://angular.dev/guide/experimental/zoneless#why-use-zoneless

ZoneJS works by patching browser APIs but does not automatically have patches for every new browser API. Some APIs simply cannot be patched effectively, such as async/await, and have to be downleveled to work with ZoneJS.

Vitest has a similar issue with fixtures:
vitest-dev/vitest#6531

We copied the regex from vitest to detect function arguments on runtime. When this issue is fixed, we should align our regex again :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant