backend-test

Generate Jest or Vitest backend tests with mocks and fixtures.

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

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Writing comprehensive backend tests, including setting up mocks and fixtures, can be time-consuming and repetitive. This skill automates the boilerplate, allowing developers to focus on test logic.

Core Features & Use Cases

  • Automated Test File Generation: Creates test files with describe/it blocks, ready for unit and integration tests using Jest/Vitest.
  • Mocks and Fixtures: Automatically generates mocks for dependencies and provides test fixtures to isolate the unit under test.
  • Edge Case Inclusion: Prompts for and includes common edge cases to ensure thorough test coverage.
  • Use Case: You've just built a new API endpoint. Invoke this skill with "Write test for user service," and it will generate a test file with basic structure, mocks for your database, and example fixtures, ready for you to fill in the specific assertions.

Quick Start

Example: Generate tests for a backend function

"Write test for user authentication service"

Frequently Asked Questions about backend-test

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

FAQPage Schema
How do I generate unit tests with mocks for my backend code?

Unit tests with mocks isolate code by replacing external dependencies. This Skill generates test files with Jest or Vitest, automatically creating mocks for database calls, API dependencies, and other services, so you test only the function logic.

What's the best way to write integration tests with fixtures?

Integration tests with fixtures validate multiple components together using realistic test data. This Skill generates test files with fixture setup, mock coordination, and describe/it blocks structured for both happy-path and error scenarios.

Can I use this for both Jest and Vitest?

Yes. This Skill generates compatible test files for both Jest and Vitest, using standard describe/it block syntax and mocking patterns that work across both frameworks.

How do I ensure my backend tests cover edge cases?

Edge-case coverage tests failure modes, boundary conditions, and error paths. This Skill automatically includes common edge cases in generated tests, prompting you to specify domain-specific scenarios for comprehensive coverage.

Why should I use test fixtures instead of hardcoding test data?

Fixtures provide reusable, maintainable test data that scales across multiple tests. This Skill generates fixture definitions alongside tests, reducing duplication and making data setup explicit and consistent.

Do I need to set up mocks manually or does the Skill generate them?

The Skill generates mocks automatically based on your codebase dependencies. It creates mock implementations for external services, databases, and libraries, ready to use in your test file.