{"id":22952,"library":"vite-test","title":"vite-test","description":"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.","status":"active","version":"0.4.0","language":"javascript","source_language":"en","source_url":"https://github.com/zigomir/vite-test","tags":["javascript","vite","test"],"install":[{"cmd":"npm install vite-test","lang":"bash","label":"npm"},{"cmd":"yarn add vite-test","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-test","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Required to render Vue components in tests (Vue 3, version 2+)","package":"@vue/test-utils","optional":false},{"reason":"Runs tests in headless Chrome for CI/terminal usage","package":"puppeteer","optional":false},{"reason":"Test runner producing TAP output","package":"zora","optional":false}],"imports":[{"note":"vite-test is not a library; use its CLI in scripts or npx","wrong":"import viteTest from 'vite-test'","symbol":"vite-test","correct":"vite-test is a CLI tool; no import needed — run via `npx vite-test`"},{"note":"vite-test uses zora as the test runner; you import test from zora","wrong":"import { test } from 'vite-test'","symbol":"test","correct":"import { test } from 'zora'"},{"note":"CommonJS require may cause issues; use ES import","wrong":"const { mount } = require('@vue/test-utils')","symbol":"mount","correct":"import { mount } from '@vue/test-utils'"}],"quickstart":{"code":"// package.json\n{\n  \"scripts\": {\n    \"test\": \"vite-test | tap-dot\",\n    \"test:debug\": \"vite-test --debug\"\n  },\n  \"devDependencies\": {\n    \"vite-test\": \"^0.4.0\",\n    \"tap-dot\": \"^2.0.0\",\n    \"zora\": \"^4.0.0\"\n  }\n}\n\n// test/my-test.test.js\nimport { test } from 'zora'\nimport { mount } from '@vue/test-utils'\nimport MyComponent from '../src/MyComponent.vue'\n\ntest('MyComponent renders', async t => {\n  const wrapper = mount(MyComponent)\n  t.ok(wrapper.exists(), 'component exists')\n  t.eq(wrapper.text(), 'Hello, World!', 'renders correct text')\n})","lang":"javascript","description":"Shows how to set up vite-test in package.json scripts and write a basic test using zora and @vue/test-utils."},"warnings":[{"fix":"Update vite-test to >=0.3.0 and ensure Vite is v2+","message":"v0.3.0 requires Vite v2; older v0.2.x may not work with Vite v2+","severity":"breaking","affected_versions":"<0.3.0"},{"fix":"Use TAP reporters like tap-dot or pipe to tap-spec","message":"v0.4.0 uses zora test runner (TAP), not the previous test runner. Scripts using non-TAP output will break","severity":"deprecated","affected_versions":">=0.4.0"},{"fix":"Run: npm install @vue/test-utils@^2.0.0","message":"Must have @vue/test-utils v2+ installed separately; vite-test does not install it automatically","severity":"gotcha","affected_versions":"*"},{"fix":"Run: npm install puppeteer","message":"Puppeteer is required for terminal/CI runs; if missing, tests fail silently","severity":"gotcha","affected_versions":"*"},{"fix":"Add 'zora' as a dependency and import { test } from 'zora'","message":"vite-test does not provide a test function; you must import 'test' from zora","severity":"gotcha","affected_versions":"*"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"npm install zora --save-dev","cause":"zora not installed","error":"Error: Cannot find module 'zora'"},{"fix":"npm install @vue/test-utils@^2.0.0 --save-dev","cause":"@vue/test-utils not installed","error":"Error: Cannot find module '@vue/test-utils'"},{"fix":"npm install puppeteer or set PUPPETEER_SKIP_DOWNLOAD=0","cause":"Puppeteer not installed or missing browser binaries","error":"Error: Failed to launch the browser process! puppeteer"},{"fix":"Use .js extension in imports, or ensure package.json has 'type': 'module'","cause":"Import path issues or lack of ESM support","error":"Error [ERR_MODULE_NOT_FOUND]: Cannot find module"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}