Skip to content

Commit bed33cc

Browse files
committed
Try to guide AI more so it writes better tests
1 parent 7b123be commit bed33cc

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,3 +347,4 @@ corepack prepare pnpm@10.17.0 --activate
347347
8. **Test on target platform** if making platform-specific changes
348348
9. **Security**: Check dependencies for vulnerabilities before adding them
349349
10. **Code marked for refactoring**: Be extra careful with crates in the "Code Hitlist" section
350+
11. **but CLI happy path testing only**: CLI tests are expensive and should be limited to what really matters.

crates/but/tests/but/command/mod.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
//! Put command-specific tests here. They should be focused on what's important for each command.
22
//! Ideally they *show* the initial state, and the *post* state, to validate the commands actually do what they claim.
3+
//! **Only** test the *happy path* of a typical user journey, while keeping details in unit tests with private module access.
34
mod branch;
45
#[cfg(feature = "legacy")]
56
mod commit;

0 commit comments

Comments
 (0)