@@ -82,14 +82,16 @@ describe("google provider plugin hooks", () => {
|
82 | 82 | } as ProviderSanitizeReplayHistoryContext), |
83 | 83 | ); |
84 | 84 | |
85 | | -expect(sanitized).toEqual( |
86 | | -expect.arrayContaining([ |
87 | | -expect.objectContaining({ |
88 | | -role: "user", |
89 | | -content: "(session bootstrap)", |
90 | | -}), |
91 | | -]), |
| 85 | +const bootstrapMessage = sanitized?.[0]; |
| 86 | +expect(bootstrapMessage?.role).toBe("user"); |
| 87 | +expect(bootstrapMessage?.content).toBe("(session bootstrap)"); |
| 88 | +expect(typeof (bootstrapMessage as { timestamp?: unknown } | undefined)?.timestamp).toBe( |
| 89 | +"number", |
92 | 90 | ); |
| 91 | +expect(sanitized?.[1]).toEqual({ |
| 92 | +role: "assistant", |
| 93 | +content: [{ type: "text", text: "hello" }], |
| 94 | +}); |
93 | 95 | expect(customEntries).toHaveLength(1); |
94 | 96 | expect(customEntries[0]?.customType).toBe("google-turn-ordering-bootstrap"); |
95 | 97 | }); |
@@ -122,8 +124,9 @@ describe("google provider plugin hooks", () => {
|
122 | 124 | ], |
123 | 125 | } as never) ?? []; |
124 | 126 | |
125 | | -expect(tool).toMatchObject({ |
| 127 | +expect(tool).toEqual({ |
126 | 128 | name: "write_file", |
| 129 | +description: "Write a file", |
127 | 130 | parameters: { |
128 | 131 | type: "object", |
129 | 132 | properties: { |
@@ -173,8 +176,12 @@ describe("google provider plugin hooks", () => {
|
173 | 176 | ); |
174 | 177 | |
175 | 178 | const capturedPayload = capturedStream.getCapturedPayload(); |
176 | | -expect(capturedPayload).toMatchObject({ |
177 | | -config: { thinkingConfig: { thinkingLevel: "HIGH" } }, |
| 179 | +expect(capturedPayload).toEqual({ |
| 180 | +config: { |
| 181 | +thinkingConfig: { |
| 182 | +thinkingLevel: "HIGH", |
| 183 | +}, |
| 184 | +}, |
178 | 185 | }); |
179 | 186 | const thinkingConfig = ( |
180 | 187 | (capturedPayload as Record<string, unknown>).config as Record<string, unknown> |
|