write-tests

Generate MSTest and Jasmine unit tests for API controllers and Angular components.

6|1|Updated Dec 13, 2017
One-click install
npx skills add https://github.com/esassoc/neptune --skill write-tests-esassoc
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: write-tests
Source: https://github.com/esassoc/neptune/tree/main/.claude/skills/write-tests
Command: npx skills add https://github.com/esassoc/neptune --skill write-tests-esassoc

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the creation of unit tests for both API controllers and Angular components, ensuring code quality and maintainability by adhering to established project patterns.

Core Features & Use Cases

  • API Controller Testing: Generates MSTest unit tests for C# API controllers, including setup, assertions, and naming conventions.
  • Angular Component Testing: Generates Jasmine unit tests for Angular components, covering component instantiation, service mocking, and template verification.
  • Use Case: When developing a new API endpoint, use this skill to quickly generate a comprehensive suite of MSTest unit tests that follow the project's established patterns.

Quick Start

Use the write-tests skill to generate an MSTest unit test for the Create_ReturnsCreatedEntity_WhenValid scenario.

Frequently Asked Questions about write-tests

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

FAQPage Schema
How do I generate MSTest unit tests for C# API controllers?

To generate MSTest unit tests for C# API controllers, provide an endpoint scenario like Create_ReturnsCreatedEntity_WhenValid, and the tool produces test code including setup, assertions, and naming conventions aligned to project patterns.

Can I generate Jasmine unit tests for Angular components?

Yes, you can generate Jasmine unit tests for Angular components. The tool creates test suites covering component instantiation, service mocking, and template verification to ensure component reliability.

What is the best way to structure unit test naming conventions for APIs?

The best way to structure unit test naming conventions for APIs is using scenario-based names like ReturnsExpectedResult_WhenCondition. The tool adheres to established project-specific testing patterns and conventions for consistent test identification.

Does this unit test generation approach support deterministic task execution?

Yes, the unit test generation approach supports deterministic task execution. It ensures tests run reliably using standard dotnet test and npm test commands for API and Angular components respectively.

How do I mock services when writing Angular component tests?

To mock services when writing Angular component tests, the tool generates Jasmine test code that includes service mocking guidance and setup logic, allowing you to isolate component behavior during template verification and instantiation.

When do I need approval testing patterns in unit tests?

You need approval testing patterns in unit tests when verifying complex object outputs against baseline standards. The tool includes guidance on implementing these patterns alongside standard service mocking for comprehensive API and component coverage.