with one click
testing
Guides ccusage Rust and Vitest tests. Use when adding or fixing cargo tests, CLI snapshots, Claude model pricing, LiteLLM compatibility, Vitest tests, or fixture-backed tests.
Menu
Guides ccusage Rust and Vitest tests. Use when adding or fixing cargo tests, CLI snapshots, Claude model pricing, LiteLLM compatibility, Vitest tests, or fixture-backed tests.
Runs the full PR lifecycle. Use when creating a branch, committing, pushing, opening a PR, requesting AI review, and driving CI and review to completion.
Guides ccusage monorepo development. Use when editing packages, docs, shared configuration, bundled CLI packaging, dependencies, exports, or validation commands.
Guides repo-local skill creation and updates. Use when adding or editing .agents/skills, SKILL.md frontmatter, references, scripts, or skill routing.
Guides ccusage TypeScript and JavaScript work. Use before reading or editing .ts, .tsx, .js, or .jsx files, including package launchers, Vitest tests, Bun scripts, schemas, mocks, and typed fixtures.
Guides t-wada Red-Green-Refactor TDD. Use when implementing features, fixing bugs, or refactoring logic with strict test-first development.
Guides ccusage agent source formats. Use when checking agent log locations, raw record structure, token mappings, model names, precomputed costs, or source-specific CLI behavior.
| name | testing |
| description | Guides ccusage Rust and Vitest tests. Use when adding or fixing cargo tests, CLI snapshots, Claude model pricing, LiteLLM compatibility, Vitest tests, or fixture-backed tests. |
Use the tdd skill for logic changes, Red-Green-Refactor workflow, focused
runner commands, Rust test syntax, and general test readability rules. This
skill owns ccusage-specific Rust and Vitest test rules: fixtures, adapter
coverage, pricing/model behavior, CLI output, schema artifacts, and package
tooling.
try/catch in tests for expected failures. Use native result,
throwing, rejecting, or explicit failure assertions for the test framework.if branches inside test bodies. Split behaviors into separate tests or
table-driven cases.For repo-wide validation, prefer the just recipe because it runs Vitest and Rust tests together:
direnv exec . just test
Put Rust unit tests near the module they exercise with #[cfg(test)] mod tests.
When splitting a large module, move its tests with the code instead of leaving
unrelated tests in main.rs.
Read references/rust.md for fixture-backed parser, path discovery, SQLite
loading, dedupe, aggregation, pricing, CLI output parity, model, and readability
rules. For focused cargo commands, Red-Green-Refactor examples, Rust test
attributes, and syntax examples, read ../tdd/references/rust.md.
Read references/vitest.md for TypeScript package launcher, schema artifact,
benchmark script, docs/package tooling, and fs-fixture test rules.