Testing
Add Vitest, Jest, Playwright, Cypress, Testing Library or MSW to a JavaScript project. DevFlow creates the configs, packages and npm scripts.
Vitest
Fast Vite-native test runner — zero-config, TypeScript-first.
- ID:
vitest - Category: Testing
- Conflicts with: Jest
What it does
- Installs
vitestand@vitest/coverage-v8 - Creates
vitest.config.ts - Adds
test,test:watch, andtest:coveragescripts
Jest
Full-featured test runner — the most popular testing framework.
- ID:
jest - Category: Testing
- Conflicts with: Vitest
What it does
- Installs
jestand related packages (TypeScript support if needed) - Creates
jest.config.tsorjest.config.js - Adds
testandtest:coveragescripts
Testing Library
DOM testing utilities — test React/Vue components by user behavior, not implementation.
- ID:
testing-library - Category: Testing
- Recommended for: React, Vue, Next.js, Nuxt
What it does
Stack-specific installation:
| Stack | Packages |
|---|---|
| React / Next.js | @testing-library/react, @testing-library/jest-dom, @testing-library/user-event |
| Vue / Nuxt | @testing-library/vue, @testing-library/jest-dom |
Playwright
Cross-browser E2E testing — test your app in Chromium, Firefox, and WebKit.
- ID:
playwright - Category: Testing
- Conflicts with: Cypress
What it does
- Installs
@playwright/test - Creates
playwright.config.ts - Adds
test:e2eandtest:e2e:uiscripts - Creates an example test file
Cypress
E2E & component testing — developer-friendly testing with time-travel debugging.
- ID:
cypress - Category: Testing
- Conflicts with: Playwright
What it does
- Installs
cypress - Creates
cypress.config.ts - Adds
cypress:openandcypress:runscripts
MSW (Mock Service Worker)
API mocking — intercept network requests at the service worker level.
- ID:
msw - Category: Testing
What it does
- Installs
msw - Creates handler stubs in
src/mocks/ - Sets up browser and server handlers