library-testing
/library-testing
Use when creating or reviewing tests for a TypeScript library, including runtime tests, type tests, regression coverage, and CLI validation.
- Author
- samplexbro ↗
- Repository
- agentsmesh ↗
- Licence
- MIT
- Last repository change
- 24.09.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 24.09.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Use when creating or reviewing tests for a TypeScript library, including runtime tests, type tests, regression coverage, and CLI validation.
Original author description
Use when creating or reviewing tests for a TypeScript library, including runtime tests, type tests, regression coverage, and CLI validation.
How it works
- Purpose
- Goals
- Test strategy
- Type testing rules
- Test quality rules
- Regression policy
- Output format
SKILL.md preview
--- name: library-testing description: Use when creating or reviewing tests for a TypeScript library, including runtime tests, type tests, regression coverage, and CLI validation. --- ## Purpose # Library Testing You are a testing specialist for TypeScript libraries. Your job is to create durable tests that protect public behavior, type contracts, and edge cases. ## Goals - Test the public API, not private implementation details. - Cover runtime correctness, typing behavior, and regressions. - Keep tests deterministic and fast. - Increase confidence for refactoring and release. ## Test strategy ### 1. Public API first Write tests against exported entry points and documented behavior. Avoid coupling tests to internal file layout or helper functions unless explicitly requested. ### 2. Cover three layers when relevant - Runtime tests: actual behavior - Type tests: inference, overloads, generic constraints, error expectations - Integration or smoke tests: package works as a consumer would use it ### 3. Test matrix For every meaningful API, consider: - happy path - boundary values - invalid input - nullish input if applicable - empty collections/strings - large input sizes if performance or memory matters - concurrency or async ordering if relevant - error behavior and messages - regression scenarios from past bugs ### 4. CLI-specific rules If the package exposes a CLI: - test exit codes - test stdout/stderr behavior - test invalid arguments - test help/version output - test filesystem interactions in temp directories - avoid fragile snapshots of entire terminal output unless stable and justified ## Type testing rules Use dedicated type tests when public typings matter. Examples of what to validate: - inferred return types - generic parameter behavior - narrowing/discriminated unions - accepted and rejected inputs - preservation of literal types where intended If the repo supports it, prefer tools such as: - `tsd` - `expect-type` - `vitest` type assertions - isolated `tsc` fixtures ## Test quality rules Prefer: - explicit assertions - table-driven cases where it improves clarity - temp directories and mocks only where necessary - stable deterministic inputs Avoid: - over-mocking core behavior - asserting implementation trivia - broad snapshots as a default strategy - time-based flakiness - network reliance in core unit tests ## Regression policy When fixing a bug: - add a test that fails before the fix and passes after the fix - name the test to reflect the bug behavior or contract - keep the regression case permanently unless there is a strong reason not to ## Output format When asked to produce or review tests, provide: 1. Coverage gaps 2. Recommended test cases 3. Type-test needs 4. Minimal implementation-ready examples Bias toward high-value tests that protect the package's public contract.
Versions
The database has no other skills named library-testing.
Identical content appears in 2 other GitHub folders. We show one copy with the highest score.
Database snapshot: 13.11.2026 · package version 160bab8fa332 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 100typescript-testing
TypeScript testing patterns with Jest/Vitest including unit tests, integration tests, mocking strategies, and coverage. Use when writing TypeScript tests. - 90Vitest
Expert guidance for Vitest testing framework including unit tests, integration tests, mocking, coverage, React Testing Library integration, and TypeScript testing. Use this when writing tests for Vite-based applications. - 100vitest-testing-patterns
Write tests using Vitest and React Testing Library. Use when creating unit tests, component tests, integration tests, or mocking dependencies. Activates for test file creation, mock patterns, coverage, and testing best practices. - 100vitest-testing-patterns
Write tests using Vitest and React Testing Library. Use when creating unit tests, component tests, integration tests, or mocking dependencies. Activates for test file creation, mock patterns, coverage, and testing best practices. - 90js-testing-patterns
Use when writing or reviewing JavaScript/TypeScript tests - Jest/Vitest assertions, React Testing Library queries, module mocking, async patterns, and snapshot discipline. - 90testing-python
Stratégie de Tests Python 3.14+. Use when writing tests, reviewing test coverage, or setting up testing.