qa-unit-tests-js
JS/TS unit testing per-framework wrappers: 5 skills (ava-tests, jasmine-tests, jest-tests, mocha-tests, vitest-tests) and 1 agent (js-test-author). Per-framework lifecycle (configure / run / mock / coverage / CI). Does not duplicate qa-test-review test code hygiene.
Install this plugin
/plugin install qa-unit-tests-js@testland-qaPart of role bundles: qa-role-sdet, qa-role-frontend
qa-unit-tests-js
JS/TS unit testing per-framework wrappers + orchestrator agent. Five framework skills + 1 agent.
Per-framework lifecycle scope (configure / run / mock / coverage / CI). Does not duplicate qa-test-review (test code hygiene); for AAA structure, assertion quality, and mocking anti-patterns, see that plugin instead.
Components
| Type | Name | Description |
|---|---|---|
| Skill | jest-tests | Meta-built batteries-included; built-in expect + snapshot + mocking + coverage; --ci flag for safe CI runs |
| Skill | vitest-tests | Vite-native; Jest-compatible API; in-source testing; browser-mode; --typecheck flag for type validation |
| Skill | mocha-tests | Pluggable runner pairable with Chai/Sinon/nyc/c8; BDD + TDD interfaces; --parallel since Mocha 8 |
| Skill | ava-tests | Concurrent-by-default per-file process isolation; explicit imports; powerful diff-rich failure output; test.failing for known-bug markers |
| Skill | jasmine-tests | Original BDD-style; legacy AngularJS heritage; built-in matchers + spies; pairs with Karma (legacy); migration-to-Jest path documented |
| Agent | js-test-author | Authors one JS/TS unit test given a target module + behavior spec; detects framework + Faker + MSW from package.json; emits idiomatic Jest/Vitest/Mocha/Jasmine/AVA test file |
Install
/plugin marketplace add testland/qa
/plugin install qa-unit-tests-js@testland-qaSkills
ava-tests
Configures and runs AVA - concurrent-by-default JS/TS test framework with isolated test files (each file runs in its own Node process), no globals (explicit `import test from 'ava'`), async-first API, snapshot support, and TypeScript via `@ava/typescript`. Use when AVA is already the chosen framework and the user wants minimal-API parallel-by-default tests, works with libraries (vs apps) where per-file isolation prevents test interference, or is switching from Mocha for per-file process isolation Mocha cannot provide. For choosing between AVA and Mocha, or for Mocha-specific work, use mocha-tests.
jasmine-tests
Configures and runs Jasmine - the original BDD-style JS test framework (predecessor to Jest) with built-in matchers + spies, no external assertion library; ships `jasmine-core` + `jasmine` runner; `spec_dir` + `helpers` convention; `jasmine.json` config; spy patterns (`spyOn`, `createSpy`); pairs with Karma for in-browser testing. Use when the user maintains legacy AngularJS / Karma+Jasmine codebases, or wants minimal BDD-style tests with no third-party assertion library.
jest-tests
Configures and runs Jest - Meta-built batteries-included JS/TS unit framework with built-in `expect`, snapshot testing, mocking (`jest.mock`, `jest.fn`, `jest.spyOn`, manual `__mocks__/`), test environment selection (`jsdom` / `node`), parallel workers, coverage via Istanbul, watch mode, and CI integration via `--ci` flag. Use when the user works with React (CRA / older Next.js) or Node services and needs the most ecosystem-supported JS test framework.
mocha-tests
Configures and runs Mocha - pluggable JS test runner pairable with Chai assertions, Sinon mocking, and nyc / c8 coverage; supports BDD interface (`describe` / `it`) and TDD interface (`suite` / `test`); async tests via callbacks / promises / async-await; `--parallel` mode (Mocha 8+); `.mocharc.json` config; per-test exclusivity via `.only()` / `.skip()`. Use when the user prefers a minimal pluggable runner (vs Jest's batteries-included) or maintains legacy Mocha codebases.
vitest-tests
Configures and runs Vitest - Vite-native unit framework with Jest-compatible API (`expect`, `vi.fn`, `vi.mock`, `vi.spyOn`); reads `vite.config.*` so existing Vite plugins work; supports in-source testing via `if (import.meta.vitest)`, browser-mode UI for headed tests, type-checking via `vitest --typecheck`, native ESM, and coverage via v8 (default) or istanbul providers. Use when the user works with Vite-based projects (Vue, Svelte, Solid, modern React with Vite) or is migrating from Jest on an existing Vite project (not bundler-free Node - use jest-tests for that).