You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ade8b58
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: .agents/skills/ccusage-testing/SKILL.md
+36-2Lines changed: 36 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -29,10 +29,44 @@ direnv exec . pnpm run test
29
29
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`.
30
30
31
31
Use fixture-backed Rust tests for parser, path discovery, SQLite loading,
32
-
dedupe, aggregation, pricing, and CLI output parity. For focused cargo commands,
33
-
read `../tdd/references/rust-running.md`; for Rust test syntax examples, read
32
+
dedupe, aggregation, pricing, and CLI output parity. Prefer
33
+
`ccusage-test-support` for temporary filesystem setup instead of hand-rolled
34
+
`env::temp_dir()` paths. For focused cargo commands, read
35
+
`../tdd/references/rust-running.md`; for Rust test syntax examples, read
34
36
`../tdd/references/rust-test-examples.md`.
35
37
38
+
## Rust Filesystem Fixtures
39
+
40
+
Use the internal `ccusage-test-support` crate for Rust tests that need temporary
41
+
files or directories. The fixture owns an `assert_fs::TempDir`, so everything is
42
+
removed automatically when the fixture variable drops at the end of the test.
0 commit comments