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
muslnode 18–223 runs
build_error
glibcnode 18–223 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
Errors
Common errors & fixes
Error: Cannot find module 'zora'
zora not installed
fixnpm install zora --save-dev
Error: Cannot find module '@vue/test-utils'
@vue/test-utils not installed
fixnpm install @vue/test-utils@^2.0.0 --save-dev
Error: Failed to launch the browser process! puppeteer
Puppeteer not installed or missing browser binaries
fixnpm install puppeteer or set PUPPETEER_SKIP_DOWNLOAD=0
Error [ERR_MODULE_NOT_FOUND]: Cannot find module
Import path issues or lack of ESM support
fixUse .js extension in imports, or ensure package.json has 'type': 'module'
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