Skip to content

Commit 0284dc1

Browse files
committed
docs: testing rule points unit tests at tests/asserts.ts
The unit-test example in the testing rule still imported from "testing/asserts". Since the runtime migration routed test assertions through tests/asserts.ts, the Runtime Boundary check counts a direct std import in tests as an increase, so following the rule tripped the check on a new test file. The example and the sentence now name tests/asserts.ts and its full export list.
1 parent 6eaddc7 commit 0284dc1

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎.claude/rules/testing/typescript-tests.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ Test isolated functionality:
7575

7676
```typescript
7777
import { unitTest } from "../test.ts";
78-
import { assert, assertEquals } from "testing/asserts";
78+
import { assert, assertEquals } from "../asserts.ts";
7979

8080
// deno-lint-ignore require-await
8181
unitTest("feature - description", async () => {
@@ -84,7 +84,7 @@ unitTest("feature - description", async () => {
8484
});
8585
```
8686

87-
Assertions from `testing/asserts`: `assert`, `assertEquals`, `assertThrows`, `assertRejects`
87+
Assertions come from `tests/asserts.ts` (relative path, e.g. `../asserts.ts` from `tests/unit/`), never from a std assertion module directly; the Runtime Boundary check flags a direct std import in tests. Exports: `assert`, `assertEquals`, `assertThrows`, `assertRejects`, `assertMatch`, `assertObjectMatch`, `assertStringIncludes`, `fail`, `AssertionError`
8888

8989
## Common Patterns
9090

0 commit comments

Comments
 (0)