Migrate to Vitest Browser Mode #11268
Labels
0 - new
New issues that need assignment.
needs milestone
Planning workflow - pending milestone assignment, has priority and/or estimate.
p - medium
Issue is non core or affecting less that 60% of people using the library
testing
Issues related to automated or manual testing.
Priority impact
p - medium
Unstable Tests
Follow up on #11262 (comment)
With migration to Lumina, Calcite switched from Jest to Vitest. However, we are still using Puppeteer.
Vitest browser mode has recently been released as experimental. It offers better developer experience as tests run in the browser (vs puppeteer approach where tests run in node.js and actions are proxied in the dom).
This means tests are able to use the native DOM API and access objects from the browser easily, and synchronously. However, it does mean that a different API needs to be used - given the number of tests Calcite has, this would likely require writing a small codemod.
Benefits of migration:
Note, while vitest browser mode is gaining features rapidly, it is still marked as experimental. Similarly, Storybook has integration with Vitest browser mode to permit using stories as templates in tests, however, this integration is still in active development for web components. Thus, Calcite team can wait till Vitest browser mode is marked as stable before doing the switch.
The text was updated successfully, but these errors were encountered: