backend-test

Generate unit, integration, and mock-based tests for existing backend code.

232|12|Updated Oct 10, 2025
One-click install
npx skills add https://github.com/qf-studio/navigator --skill backend-test-qf-studio
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: backend-test
Source: https://github.com/qf-studio/navigator/tree/main/skills/backend-test
Command: npx skills add https://github.com/qf-studio/navigator --skill backend-test-qf-studio

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Existing backend code often ships without tests, and writing coverage after the fact means manually detecting the test framework, matching project conventions, and wiring up mocks. This Skill automates that workflow so you get passing tests that mirror your project's existing patterns. ## Core Features & Use Cases - Framework Detection: Automatically detects Jest, Vitest, Mocha, or the Node built-in test runner and reads peer test files to match existing conventions. - Structured Test Generation: Produces happy-path, error-case, and edge-case tests, including supertest-based API integration tests, placed where the project already keeps tests. - Verification Loop: Runs the generated tests and fixes incorrect test assumptions while surfacing real bugs in the source instead of silently changing it. - Use Case: You have a legacy userService.ts with zero coverage. Ask for tests and receive a Vitest file with mocked dependencies that passes on the first run. ## Quick Start Write tests for src/services/userService.ts covering the happy path, error cases, and edge cases.

Frequently Asked Questions about backend-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate tests for existing backend code?

Point the Skill at a file, function, or API endpoint and it reads the source, detects your test framework, and generates a test file covering happy paths, error cases, and edge cases. It then runs the tests to confirm they pass.

How do I write integration tests for an API endpoint with supertest?

The Skill generates supertest-based tests that import your app, send requests to the target endpoint, and assert on status codes and response body shape. It covers both successful requests and 4xx error responses for invalid input.

Jest vs Vitest vs Mocha: which test framework does it support?

All three are supported, plus the built-in node:test runner. The Skill detects the framework by inspecting package.json and reads a peer test file to match your project's existing style and conventions.

What happens when a generated test fails?

If a test fails because it assumed incorrect behavior, the Skill fixes the test rather than the source code. If the failure reveals a genuine bug in the source, it surfaces the bug to you instead of silently modifying your code.

When should I not use this test generation approach?

Do not use it when creating a new endpoint from scratch, since endpoint-generation workflows already produce tests as part of their output. It is also not intended for UI component testing, which requires a frontend testing tool.