Codex TypeScript Vitest for Unit Tests and Local Mocks
Organize unit and integration tests and use precise assertions, boundary cases, and isolated fixtures for TypeScript behavior.
中文Install in Codex
Codex with a pipes-sdk checkout or a TypeScript practice project and its Node and Vitest environment.
- Open the pinned GitHub original and retain the complete `.agents/skills/typescript-vitest/` directory in the checkout.
- Open Codex in that checkout and invoke `$typescript-vitest` with the example task and desired output.
Example task
Invoke `$typescript-vitest` to cover a local product-filter function with one match and one no-match case. Assert returned values against a fixed array fixture.What to check
The tests assert the matched record and the empty array. The focused suite is reproducible and each case has clear inputs.
Original SKILL.md on GitHub · Updated
Frequently asked question
What tests belong next to source files?
Place unit tests beside the implementation. Integration tests can live in a dedicated tests directory.