unit-testing

Installation
SKILL.md

Unit Testing

Conventions

  • Co-locate tests: foo.test.ts next to foo.ts
  • Always wrap in describe named after the unit under test
  • Use test, not it
  • Test behavior through public interfaces, not implementation details
  • Good tests survive refactors — if the public API doesn't change, tests shouldn't break
describe("createCart", () => {
  test("calculates total for multiple items", () => { ... });
  test("returns empty items for new cart", () => { ... });
});

Vitest API

Related skills
Installs
9
GitHub Stars
4
First Seen
Mar 6, 2026