vue-jest
Jest Vue transform
This package has a good security score with no known vulnerabilities.
Community Reviews
Outdated transformer superseded by official Vue testing solutions
The documentation is sparse and hasn't kept pace with the Vue ecosystem evolution. There's minimal guidance on handling composition API, script setup syntax, or TypeScript in SFCs. You'll find yourself debugging transformation issues without clear direction. The lack of maintenance means compatibility problems with newer Jest versions, Babel configurations, and Vue features simply won't be addressed.
For any new project, you should use @vue/test-utils with Vitest or the official @vue/vue3-jest (for Jest). The migration path from vue-jest isn't documented, leaving you to figure out configuration changes on your own. The only reason to keep vue-jest is if you're maintaining a legacy Vue 2 project and can't justify the migration effort.
Best for: Maintaining existing Vue 2 projects where changing the test infrastructure isn't feasible.
Avoid if: You're starting a new project, using Vue 3, or need modern SFC features like script setup and composition API.
Legacy transformer superseded by @vue/vue3-jest - migration path unclear
The documentation is sparse and outdated, offering minimal guidance on configuration edge cases. Error messages when transformations fail are cryptic - you'll often see raw compiler errors without context about what went wrong in your test setup. TypeScript support exists but feels bolted on, with type definitions that don't cover common configuration scenarios. The migration path to @vue/vue3-jest isn't documented anywhere official, leaving developers to piece together solutions from GitHub issues.
For Vue 2 projects locked in maintenance mode, it still functions adequately for basic component testing. However, the lack of maintenance means you're on your own when encountering issues with newer Node versions or Jest updates.
Best for: Maintaining existing Vue 2 projects already using vue-jest where migration isn't immediately feasible.
Avoid if: You're working with Vue 3, need Composition API support, or starting any new project regardless of Vue version.
Unmaintained transform with security and compatibility concerns
The biggest pain point is dependency drift. As Vue, Jest, and their ecosystems evolve, you'll encounter breaking changes that won't be addressed. I've hit scenarios where TypeScript definitions are missing or incorrect, and crypto-related dependencies in the chain have CVEs that never get patched. The transform itself doesn't validate input thoroughly - malformed SFCs can cause crashes that expose stack traces with sensitive build paths.
For new projects, @vue/vue3-jest or Vitest are better choices with active maintenance and security updates. If you're stuck with vue-jest, pin all transitive dependencies and monitor them closely.
Best for: Legacy Vue 2 projects already using it where migration cost outweighs risks and dependencies are strictly pinned.
Avoid if: You're starting a new project, using Vue 3, or need active security maintenance and dependency updates.
Sign in to write a review
Sign In