{"id":42233,"library":"vite-plugin-intellitester","title":"Vite Plugin Autotester","description":"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.","status":"active","version":"0.5.6","language":"javascript","source_language":"en","source_url":"https://github.com/ZachHandley/Intellitester","tags":["javascript","vite","plugin","testing","intellitester","e2e","typescript"],"install":[{"cmd":"npm install vite-plugin-intellitester","lang":"bash","label":"npm"},{"cmd":"yarn add vite-plugin-intellitester","lang":"bash","label":"yarn"},{"cmd":"pnpm add vite-plugin-intellitester","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"peer dependency; the plugin only works with Vite 5, 6, or 7","package":"vite","optional":false}],"imports":[{"note":"The plugin exports a named function 'autotester', not a default export.","wrong":"import autotester from 'vite-plugin-autotester'","symbol":"autotester","correct":"import { autotester } from 'vite-plugin-autotester'"},{"note":"Options type is exported as a type, so use 'import type' to avoid runtime errors.","wrong":"import { VitePluginAutotesterOptions } from 'vite-plugin-autotester'","symbol":"VitePluginAutotesterOptions","correct":"import type { VitePluginAutotesterOptions } from 'vite-plugin-autotester'"},{"note":"CommonJS usage requires destructuring; the module exports an object with 'autotester'.","wrong":"const autotester = require('vite-plugin-autotester')","symbol":"require('vite-plugin-autotester')","correct":"const { autotester } = require('vite-plugin-autotester')"}],"quickstart":{"code":"// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { autotester } from 'vite-plugin-autotester';\n\nexport default defineConfig({\n  plugins: [\n    autotester({\n      include: ['src/components/**/*.tsx'],\n      testsDir: './tests',\n      watchTests: true,\n      runOnBuild: false,\n      configPath: 'autotester.config.yaml',\n    }),\n  ],\n});\n","lang":"typescript","description":"Shows how to add the autotester Vite plugin with configuration options in a TypeScript Vite config."},"warnings":[{"fix":"Add an 'include' array with glob patterns matching your components.","message":"The 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.","severity":"breaking","affected_versions":">=0.0.0"},{"fix":"Use 'vite-plugin-autotester' as the npm package name.","message":"The package name 'vite-plugin-autotester' may not match the GitHub repository name 'Intellitester'. Ensure you are referencing the correct package on npm.","severity":"deprecated","affected_versions":">=0.0.0"},{"fix":"Delete old test stub files manually if you want regeneration.","message":"Test 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.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Change the 'endpoint' option to a custom path to avoid conflicts.","message":"The plugin's dev server endpoint '/__autotester' defaults to port 5173 but may conflict with other Vite plugins or middleware that use the same path.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"search_vec":"'/__autotester':35 '5':65 '6':66 '7':68 'activ':54 'automat':21 'autotest':3,7,15 'build':51 'compar':69 'compon':28 'dev':31,80 'e2e':88 'endpoint':33 'file':45 'focus':75 'generat':22,78 'hot':40 'integr':14,73 'intellitest':87 'javascript':83 'maintain':55 'manag':38 'modul':41 'option':47 'plugin':2,6,12,85 'project':19 'provid':29 'regular':57 'releas':58 'replac':42 'requir':63 'run':48 'server':32,81 'ship':59 'specifi':27 'stub':25,77 'support':39 'test':16,24,37,44,49,72,86 'type':61 'typescript':60,89 'ux':82 'v0.5.6':8 'vite':1,5,11,18,64,84 'vite-plugin-autotest':4 'yaml':23","created_at":"2026-06-04T18:56:15.885697+00:00","updated_at":"2026-06-04T18:56:15.885697+00:00","problems":[{"fix":"Use the ESM import syntax: `import { autotester } from 'vite-plugin-autotester'`","cause":"Using 'require' with a destructured import on a module that doesn't have the expected exports (e.g., if the package is ESM-only).","error":"TypeError: Cannot destructure property 'autotester' of 'require(...)' as it is undefined."},{"fix":"Upgrade Vite to version 5, 6, or 7: `npm install vite@latest`","cause":"The plugin requires Vite 5, 6, or 7, but an older version is installed.","error":"Uncaught Error: [vite] Cannot start plugin because Vite version 4 is not supported."},{"fix":"Set `include` to glob patterns that match your component files, e.g., `include: ['src/components/**/*.tsx', 'src/pages/**/*.tsx']`.","cause":"The 'include' option was not provided or matched zero files.","error":"The plugin did not generate any test stubs. Expected stubs for components."}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":null,"cli_name":null,"cli_version":null,"type":"library","homepage":"https://github.com/ZachHandley/Intellitester","github":"https://github.com/ZachHandley/Intellitester","docs":null,"changelog":null,"pypi":null,"npm":"vite-plugin-intellitester","openapi_spec":null,"status_page":null,"smithery":null,"categories":["testing"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-04","next_check":"2026-09-02","install_tag":null}}