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
Copy file name to clipboardExpand all lines: .github/copilot-instructions.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -33,6 +33,14 @@ Each item must use this format:
33
33
-[ ] Response includes `x-test` header when defined
34
34
-[ ] Existing routes without examples behave unchanged
35
35
36
+
### Exception: Design PRs
37
+
38
+
When the goal of the **PR** is to **create more issues rather than write code** (e.g., proposing issue files under `.github/issue-proposals/`), treat the PR as a **design PR**:
39
+
40
+
1. Add the `design` label to the PR.
41
+
2. Do **not** include a "## Manual acceptance tests" section — omit it entirely.
42
+
3. The CI check for manual acceptance tests will automatically pass for PRs with the `design` label.
43
+
36
44
## Test-driven workflow
37
45
38
46
When implementing a change, work in a test-first or test-guided way whenever practical.
@@ -68,6 +76,30 @@ Add or update tests for:
68
76
- generated code, when generation behavior is being changed
69
77
- any change that affects external contracts, APIs, schemas, or CLI behavior
70
78
79
+
### File system operations in tests
80
+
81
+
When tests need to read or write files, always use `usingTemporaryFiles()` from the `using-temporary-files` package (already a devDependency). Never import `node:fs`, `fs`, `node:fs/promises`, or `fs/promises` directly in test files.
82
+
83
+
The `$` helper passed to the callback provides:
84
+
-`$.add(relativePath, contents)` — create or overwrite a file
85
+
-`$.addDirectory(relativePath)` — create a directory
86
+
-`$.read(relativePath)` — read a file's contents (returns `Promise<string>`)
87
+
-`$.remove(relativePath)` — delete a file
88
+
-`$.path(relativePath)` — resolve an absolute path within the temporary directory (use this when passing paths to the code under test)
0 commit comments