- Home
- Skills
- Maxritter
- Pilot Shell
- Standards Tests
standards-tests_skill
- TypeScript
419
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill maxritter/pilot-shell --skill standards-tests- SKILL.md6.0 KB
Overview
This skill guides writing focused, fast tests for core user flows and critical business logic while deferring non-essential coverage. It enforces clear test names, behavior-focused assertions, mocked external dependencies, and minimal scope during development to keep feedback loops fast. Use it to produce practical, maintainable tests that protect primary workflows without slowing feature progress.
How this skill works
The skill inspects proposed or existing test code and suggests edits to ensure tests target happy paths and critical calculations with descriptive names and behavior assertions. It recommends mocking external systems (databases, APIs, file systems), keeping tests fast, and deferring edge-case or non-critical tests unless explicitly requested. It also supplies a simple decision framework to determine whether to add a test now or postpone it.
When to use it
- When creating or modifying test files (test/, __tests__/, *.test.js, *.spec.ts, test_*.py)
- When implementing unit or integration tests for core user workflows
- When writing tests for business-critical calculations or data transformations
- When mocking external dependencies to isolate units
- When adopting TDD but wanting minimal failing tests for primary paths
- When deciding test coverage strategy during feature development
Best practices
- Name tests descriptively using pattern like test_<function>_<scenario>_<expected_result>
- Test behavior and outcomes, not internal implementation details
- Mock databases, APIs, file systems and other external services to keep tests isolated and fast
- Focus on happy paths and critical logic; defer edge cases unless business-critical or requested
- Keep unit tests executing in milliseconds; move slow scenarios to integration suites
Example use cases
- Write a unit test that verifies checkout creates an order given a valid cart and mocked payment API
- Add a test for a core data transformation used by reporting logic, mocking the upstream data source
- Create a fast login flow test that asserts token is returned for correct credentials, mocking the user store
- When refactoring billing code, add tests for main calculations and defer rare error paths
- During TDD, write a minimal failing test for the primary feature behavior, implement, then stop unless more tests are requested
FAQ
No. Only test critical paths and core business logic during development; defer non-critical utilities and edge cases unless explicitly requested.
What if a test needs network or database access?
Mock the external dependency or use an in-memory replacement so the unit test stays isolated and fast; move full integration scenarios to a separate suite.