Registry / testing / vite-test

vite-test

JSON →
library0.4.0jsnpmunverified

vite-test (v0.4.0) lets you test Vue apps in real browsers using Vite and Puppeteer. It uses the zora test runner with TAP output, provides quick execution in a native browser environment compared to jsdom-based jest. Release cadence is irregular; last release v0.4.0 (zora & TAP ftw). Key differentiators: leverages Vite's dev server for fast HMR during debugging, supports both headless CI (Puppeteer) and browser debug mode.

npm install vite-test
INSTALL
IMPORT
SIG · VITE-TEST
V
vite-test
testingjavascriptv0.4.0
Install
Import
Disk
Pass rate
0/ 6
Env Coverage0 / 6
glibc
1822
musl
1822
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18223 runs
build_error
glibc
node 18223 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

vite-test
vite-test is a CLI tool; no import needed — run via `npx vite-test`
import viteTest from 'vite-test'
vite-test is not a library; use its CLI in scripts or npx
test
import { test } from 'zora'
import { test } from 'vite-test'
vite-test uses zora as the test runner; you import test from zora
mount
import { mount } from '@vue/test-utils'
const { mount } = require('@vue/test-utils')
CommonJS require may cause issues; use ES import

Shows how to set up vite-test in package.json scripts and write a basic test using zora and @vue/test-utils.

// package.json { "scripts": { "test": "vite-test | tap-dot", "test:debug": "vite-test --debug" }, "devDependencies": { "vite-test": "^0.4.0", "tap-dot": "^2.0.0", "zora": "^4.0.0" } } // test/my-test.test.js import { test } from 'zora' import { mount } from '@vue/test-utils' import MyComponent from '../src/MyComponent.vue' test('MyComponent renders', async t => { const wrapper = mount(MyComponent) t.ok(wrapper.exists(), 'component exists') t.eq(wrapper.text(), 'Hello, World!', 'renders correct text') })
vite-test --version
Debug
Known issues
breakingv0.3.0 requires Vite v2; older v0.2.x may not work with Vite v2+
fix
Update vite-test to >=0.3.0 and ensure Vite is v2+
affects: <0.3.0
deprecatedv0.4.0 uses zora test runner (TAP), not the previous test runner. Scripts using non-TAP output will break
fix
Use TAP reporters like tap-dot or pipe to tap-spec
affects: >=0.4.0
gotchaMust have @vue/test-utils v2+ installed separately; vite-test does not install it automatically
fix
Run: npm install @vue/test-utils@^2.0.0
affects: *
gotchaPuppeteer is required for terminal/CI runs; if missing, tests fail silently
fix
Run: npm install puppeteer
affects: *
gotchavite-test does not provide a test function; you must import 'test' from zora
fix
Add 'zora' as a dependency and import { test } from 'zora'
affects: *
Errors
Common errors & fixes
Error: Cannot find module 'zora'
zora not installed
fix
npm install zora --save-dev
Error: Cannot find module '@vue/test-utils'
@vue/test-utils not installed
fix
npm install @vue/test-utils@^2.0.0 --save-dev
Error: Failed to launch the browser process! puppeteer
Puppeteer not installed or missing browser binaries
fix
npm install puppeteer or set PUPPETEER_SKIP_DOWNLOAD=0
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
Import path issues or lack of ESM support
fix
Use .js extension in imports, or ensure package.json has 'type': 'module'
Upgrade
Version history
0.4.0latest on npm
Audit
Dependencies
@vue/test-utilsrequiredRequired to render Vue components in tests (Vue 3, version 2+)
puppeteerrequiredRuns tests in headless Chrome for CI/terminal usage
zorarequiredTest runner producing TAP output
Agent activity
8 hits · last 30 days
node
8
Resources