Skip to content

Commit 8241905

Browse files
authored
test(core): give the telemetry-swap client mock a getToolRegistry (QwenLM#10220)
GeminiClient.initialize() now calls restoreLoadedSkillsFromHistory, which resolves the SKILL tool through this.config.getToolRegistry(). The telemetry- swap transaction tests build a minimal config mock that predates that call and does not provide getToolRegistry, so every test that awaits client.initialize() throws "this.config.getToolRegistry is not a function" and the file reds the Linux unit lane. Add getToolRegistry to the mock, returning an empty registry (no SKILL tool, so the skill restore is a no-op) — the transaction behaviour under test is unchanged.
1 parent fc0e827 commit 8241905

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

packages/core/src/core/client.telemetrySwap.test.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,11 @@ function makeEnv() {
9393
sessionId = id;
9494
resumedData = data;
9595
},
96+
// `initialize()` calls restoreLoadedSkillsFromHistory, which resolves the
97+
// SKILL tool through the registry; this mock only exercises the telemetry
98+
// swap, so return an empty registry (no SKILL tool → the restore is a
99+
// no-op) rather than let the call throw `getToolRegistry is not a function`.
100+
getToolRegistry: () => ({ getTool: () => undefined }),
96101
};
97102
const client = new GeminiClient(config as Config);
98103
const fakeChat = {

0 commit comments

Comments
 (0)