Borrowing it
Nothing to install: this file belongs to Insight-Services-APAC/ingenious. Take a copy, put it at the same path in your own repository, and replace the rules that are about this project with yours.
curl -O https://raw.githubusercontent.com/Insight-Services-APAC/ingenious/main/.claude/commands/quality/js-quality/gen-tests.mdgit clone --depth 1 https://github.com/Insight-Services-APAC/ingeniousWrote this? Show the measurements
A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.
[](https://agentmods.dev/commands/insight-services-apac/ingenious/gen-tests)<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/gen-tests"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/gen-tests/github.svg" alt="Measured on agentmods" height="20"></a>Or the 80×15 button, for a site that already has a row of RSS and ATOM ones. Only the verdict fits; the numbers stay here.
<a href="https://agentmods.dev/commands/insight-services-apac/ingenious/gen-tests"><img src="https://agentmods.dev/badge/commands/insight-services-apac/ingenious/gen-tests.svg" alt="Reviewed on agentmods" width="80" height="20"></a>What it costs to keep this loaded
Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.
| Model | Per session | Once invoked |
|---|---|---|
| Fable 5.1 | $0.00000 | $0.00835 |
| Opus 5.5 | $0.00000 | $0.00334 |
| Sonnet 5.5 | $0.00000 | $0.00167 |
| Haiku 4.5 | $0.00000 | $0.00084 |
Grade A, and why
gen-tests scanned grade A with 0 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 1mo ago.
A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.
Nothing flagged
None of the 26 patterns this scan looks for appear in this file: no shell pipes, no recursive deletes, no credential paths, no hidden text, no instruction-override or anti-refusal phrasing, no agent-config snooping. That is not a guarantee, it is the absence of the things that are checkable.
How it starts
The opening of the file, as written. The whole thing — 117 lines — stays where its author put it; the contents beside it link to each section on GitHub.
Generate Tests
Generate comprehensive tests for the JavaScript/TypeScript codebase, including unit tests (Vitest) and end-to-end browser tests (Playwright).
Step 1: Analyze Existing Test Coverage
-
Check if tests exist:
npm test -- --coverage 2>/dev/null || echo "No tests found or coverage not configured" -
If using Vitest with coverage:
npx vitest run --coverage -
Identify untested or under-tested modules by reviewing the coverage report.
Step 2: Generate Unit Tests (Vitest)
For each module or function lacking coverage:
-
Analyze the code - understand inputs, outputs, side effects, and edge cases
-
Create test file - follow the naming convention
<module>.test.tsor__tests__/<module>.test.ts -
Write tests covering:
- Happy path scenarios
- Edge cases (empty inputs, boundary values, null/undefined handling)
- Error conditions and exception handling
- Mocked external dependencies (APIs, stores)
-
Use test utilities for common setup in test helpers
Example test structure:
import { describe, it, expect, vi, beforeEach } from 'vitest';
import { functionUnderTest } from './module';
describe('functionUnderTest', () => {
beforeEach(() => {
vi.clearAllMocks();
});
it('should return expected result for valid input', () => {
const result = functionUnderTest('valid');
expect(result).toBe('expected');
});
it('should throw error for invalid input', () => {
expect(() => functionUnderTest(null)).toThrow();
});
});
- Run and verify:
npx vitest run <test-file>
Step 3: Generate E2E Browser Tests (Playwright)
If the project has web routes/UI components:
-
Create E2E test directory:
tests/e2e/ -
Write E2E tests in
tests/e2e/<feature>.spec.ts:- Test critical user flows (navigation, form submissions)
- Test UI state changes and interactions
- Test API responses via the browser
- Use
page.goto(),page.click(),page.fill(),expect()assertions
What this file has done since we first saw it
Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.
- 1mo ago First seen · 117 lines · 0 tokens per session scan A f6eb782f342b
gen-tests is a command published in the GitHub repository Insight-Services-APAC/ingenious (25 stars, last pushed 9mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 835 tokens. A static security scan graded it A with 0 findings. No closer match exists in the catalogue, so it is treated as the original; first seen 2026-09-04.
Other commands, from other repositories
gsd-add-tests
Generate tests for a completed phase based on UAT criteria and implementation.
create-backend-tests
Command "create-backend-tests" from codeready-toolchain/tarsy, covering writing tests for go backend, running tests, from project root, direct go commands and critical rules.
add-tests
Generate comprehensive tests for a component or API endpoint.
testing
Comprehensive testing setup for FastAPI applications with pytest and async support.
webapp-testing
Toolkit for interacting with and testing local web applications using Playwright. Supports verifying frontend functionality, debugging UI behavior, capturing browser screenshots, and viewing browser logs.
test
Escrever e rodar testes (skill 05 — QA Engineer).