Open kasperpeulen opened 3 days ago
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
mount
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: https://github.com/vitest-dev/vitest/pull/6531
We copied the regex from vitest to detect function arguments on runtime. When this issue is fixed, we should align our regex again :)
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-renderedAngular can not use ES2017 (specifically: async/await) natively if zone.js is used https://angular.dev/guide/experimental/zoneless#why-use-zoneless
Vitest has a similar issue with fixtures: https://github.com/vitest-dev/vitest/pull/6531
We copied the regex from vitest to detect function arguments on runtime. When this issue is fixed, we should align our regex again :)