Registry / testing / vite-plugin-intellitester

vite-plugin-intellitester

JSON →
library0.5.6jsnpmunverified

vite-plugin-autotester (v0.5.6) is a Vite plugin that integrates AutoTester testing into Vite projects. It automatically generates YAML test stubs for specified components, provides a dev server endpoint at /__autotester for test management, supports hot module replacement for test files, and optionally runs tests after build. It is actively maintained with regular releases, ships TypeScript types, and requires Vite 5, 6, or 7. Compared to other testing integrations, it focuses on stub generation and dev server UX.

npm install vite-plugin-intellitester
INSTALL
IMPORT
SIG · VITE-PLUGIN-INTELL
V
vite-plugin-intellitester
testingjavascriptv0.5.6
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

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

autotester
✓ import { autotester } from 'vite-plugin-autotester'
✗ import autotester from 'vite-plugin-autotester'
The plugin exports a named function 'autotester', not a default export.
VitePluginAutotesterOptions
✓ import type { VitePluginAutotesterOptions } from 'vite-plugin-autotester'
✗ import { VitePluginAutotesterOptions } from 'vite-plugin-autotester'
Options type is exported as a type, so use 'import type' to avoid runtime errors.
require('vite-plugin-autotester')
✓ const { autotester } = require('vite-plugin-autotester')
✗ const autotester = require('vite-plugin-autotester')
CommonJS usage requires destructuring; the module exports an object with 'autotester'.

Shows how to add the autotester Vite plugin with configuration options in a TypeScript Vite config.

// vite.config.ts import { defineConfig } from 'vite'; import { autotester } from 'vite-plugin-autotester'; export default defineConfig({ plugins: [ autotester({ include: ['src/components/**/*.tsx'], testsDir: './tests', watchTests: true, runOnBuild: false, configPath: 'autotester.config.yaml', }), ], });
Debug
Known issues
breakingThe plugin does NOT generate test stubs for components unless the 'include' option is explicitly provided. Without include, no stubs are created and the plugin appears to do nothing.
fix
Add an 'include' array with glob patterns matching your components.
affects: >=0.0.0
deprecatedThe package name 'vite-plugin-autotester' may not match the GitHub repository name 'Intellitester'. Ensure you are referencing the correct package on npm.
fix
Use 'vite-plugin-autotester' as the npm package name.
affects: >=0.0.0
gotchaTest stubs are only generated for files that do not already exist. If a test file exists, it will not be overwritten, which may cause confusion when component props change.
fix
Delete old test stub files manually if you want regeneration.
affects: >=0.0.0
gotchaThe plugin's dev server endpoint '/__autotester' defaults to port 5173 but may conflict with other Vite plugins or middleware that use the same path.
fix
Change the 'endpoint' option to a custom path to avoid conflicts.
affects: >=0.0.0
Errors
Common errors & fixes
TypeError: Cannot destructure property 'autotester' of 'require(...)' as it is undefined.
Using 'require' with a destructured import on a module that doesn't have the expected exports (e.g., if the package is ESM-only).
fix
Use the ESM import syntax: `import { autotester } from 'vite-plugin-autotester'`
Uncaught Error: [vite] Cannot start plugin because Vite version 4 is not supported.
The plugin requires Vite 5, 6, or 7, but an older version is installed.
fix
Upgrade Vite to version 5, 6, or 7: `npm install vite@latest`
The plugin did not generate any test stubs. Expected stubs for components.
The 'include' option was not provided or matched zero files.
fix
Set `include` to glob patterns that match your component files, e.g., `include: ['src/components/**/*.tsx', 'src/pages/**/*.tsx']`.
Upgrade
Version history
0.5.6latest on npm
Audit
Dependencies
viterequiredpeer dependency; the plugin only works with Vite 5, 6, or 7
Agent activity
12 hits · last 30 days
node
12
Resources
vite-plugin-intellitester — npm install vite-plugin-intellitester · libregistry