Repository navigation
Commit 439319b
test(forks): drop call-count assertions from the sync-default suite
CLAUDE.md forbids tests that assert a mock was called. Three assertions in
this suite were exactly that shape - `mock.calls).toHaveLength(0)` on the
audit and analytics mocks - and they proved only what the mock itself
decided, not anything about the use case.
The no-op case now asserts the result instead: `projectAudit` maps over
`changedWorkspaces` and `afterSuccess` returns early when it is empty, so an
empty result IS "no audit, no analytics", pinned to the value the fan-out
actually reads. The admission case keeps its rejection assertion, which is
the real guarantee: admission runs before the transaction opens.
What stays reads the CONTENT of the entries filed - each one carried by its
own workspace id and name - which is a fan-out invariant type-check cannot
see and the reason this suite exists. Confirmed it still goes red on the
pre-fix code: reverting the audit-name guard fails with
"expected 'root-ws' to be 'Name of root-ws'".
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 297cb1b commit 439319b
1 file changed
Lines changed: 8 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
| 8 | + | |
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
98 | 103 | | |
99 | 104 | | |
100 | | - | |
101 | | - | |
102 | 105 | | |
103 | 106 | | |
104 | 107 | | |
| |||
119 | 122 | | |
120 | 123 | | |
121 | 124 | | |
122 | | - | |
| 125 | + | |
123 | 126 | | |
124 | 127 | | |
125 | 128 | | |
126 | 129 | | |
127 | | - | |
128 | 130 | | |
129 | 131 | | |
130 | 132 | | |
| |||
0 commit comments