-
Notifications
You must be signed in to change notification settings - Fork 33
feat(vitest): add Vite plugin for Svelte browser import and autocleanup #362
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pretty good idea! Should be mentioned in the README, probably?
Done! I will undraft once I've smoke tested the latest changes with a real-world test suite + put up a docs PR |
Pushed a couple |
src/vite.js
Outdated
*/ | ||
const addAutoCleanup = (config) => { | ||
const test = config.test ?? {} | ||
const setupFiles = test.setupFiles ?? [] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
setupFiles
may be string | string[]
, need to account for that case
🎉 This PR is included in version 5.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR adds a Vite plugin export to more reliably configure STL with Vitest:
resolve.conditions
test.setupFiles
automaticallyCloses #359