test(gemini-vertex): use toMatchObject for normalized-shape assertion

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
gitdevine
2026-06-26 11:37:39 +02:00
co-authored by Claude Fable 5
parent 33bdb8545d
commit d85d4e55f3
@@ -26,13 +26,12 @@ describe('normalizeMessages malformed-payload hardening', () => {
const out = normalizeMessages([
{ type: 'user', message: { content: 'hello' }, uuid: 'u1' },
] as unknown as Message[])
expect(out).toEqual([
{
type: 'user',
uuid: 'u1',
message: { content: [{ type: 'text', text: 'hello' }] },
},
])
expect(out).toHaveLength(1)
expect(out[0]).toMatchObject({
type: 'user',
uuid: 'u1',
message: { content: [{ type: 'text', text: 'hello' }] },
})
})
test('keeps a well-formed assistant block message', () => {