vite-component-test-starter
vite-component-test-starter copied to clipboard
⚡️ Vite + Vue Test Utils starter 👩🏻🔬
Vite Component Test Starter
⚠️ EXPERIMENTAL Starter for Vue Test Utils with Vite
@vue/test-utils integration with Vue Components served by Vite
Features
- Component Driven Development Workflow
- Running individual specs one-at-a-time with
/tests?spec=HelloWorld.spec.js,App.spec.js
- Full customization of runner and plugins provided by aria-vue
TODO
- [x] Headless mode
- [x] In-browser Reporter
- [x] queueing multiple specs
- [ ] Re-run specs on source or spec file update
Installation
- Clone this repository
-
npm install
-
npm run headless
to run your test in headless -
npm run tdd
to run in tdd mode -
npm run tdd:vite
to run in tdd mode using vite
Benefits
- Zero configuration. Vite is zero config. Your tests can be, too.
- Convenience. By sharing transform middleware with Vite, you do not need to maintain two sources of truth for your code transforms (e.g.
jest.config.js
and awebpack.config.js
) - Speed. Bundling all of your specs is slower than transforming by resource request with Vite.