Commit 29f7469
fix(gateway): scope assertion to check only injection-related log messages
The test "does not log when no memories or goals are injected" was
checking mockLogInfo.not.toHaveBeenCalled() — too broad since
mockLogInfo intercepts all getLog().info() calls in the gateway,
including infrastructure logs (PostgreSQL, Schema init) that fire
during test execution.
Now checks: mockLogInfo.not.toHaveBeenCalledWith(expect.stringContaining('Injected'))
This correctly verifies the middleware doesn't log its own injection
message while allowing unrelated infrastructure logs to pass.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent ba2841f commit 29f7469
1 file changed
Lines changed: 1 addition & 1 deletion
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1157 | 1157 | | |
1158 | 1158 | | |
1159 | 1159 | | |
1160 | | - | |
| 1160 | + | |
1161 | 1161 | | |
1162 | 1162 | | |
1163 | 1163 | | |
| |||
0 commit comments