Compare commits

...
1 Commits
Author SHA1 Message Date
tbenandClaude Opus 5.5 48cc14407c Stop read-image's test leaking a stubbed grabChatParams into its own tests
CI / check (push) Waiting to run
Bun's mock.restore() doesn't undo mock.module, so CI failed grabChatParams
whenever read-image.test.ts ran first.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-12-04 15:18:38 +01:00
+7 -2
View File
@@ -49,8 +49,13 @@ mock.module("@/src/harness/providers/grab-harness-adapter", () => ({
},
}),
}));
mock.module("@/src/harness/text/grab-chat-params", () => ({
default: async () => ({ source: "default", paramsFor: () => ({}) }),
/**
* The setting under `grabChatParams`, not `grabChatParams` itself: Bun's
* `mock.restore()` doesn't undo `mock.module`, so a stubbed
* `grabChatParams` leaked into its own tests whenever this file ran first.
*/
mock.module("@/src/functions/backend/db/harness/grab-harness-setting", () => ({
default: async () => ({ harness: "vision", fallback: true, enabled: true, options: {}, source: "default" }),
}));
mock.module("@/src/harness/usage/record-harness-usage", () => ({
default: async () => {},