From ade5b56930ec696917253ef8237df7b98d5f61cb Mon Sep 17 00:00:00 2001 From: Shakker Date: Mon, 11 May 2026 02:57:34 +0100 Subject: [PATCH] test: tighten volcengine catalog assertions --- extensions/volcengine/index.test.ts | 34 ++++++++++++++--------------- 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/extensions/volcengine/index.test.ts b/extensions/volcengine/index.test.ts index 6e8cc994da6..3b29632684b 100644 --- a/extensions/volcengine/index.test.ts +++ b/extensions/volcengine/index.test.ts @@ -17,26 +17,24 @@ describe("volcengine plugin", () => { entries: [], } as never); - expect(entries).toContainEqual( - expect.objectContaining({ + expect(entries).toEqual([ + ...DOUBAO_MODEL_CATALOG.map((entry) => ({ provider: "volcengine", - id: DOUBAO_MODEL_CATALOG[0].id, - name: DOUBAO_MODEL_CATALOG[0].name, - reasoning: DOUBAO_MODEL_CATALOG[0].reasoning, - input: [...DOUBAO_MODEL_CATALOG[0].input], - contextWindow: DOUBAO_MODEL_CATALOG[0].contextWindow, - }), - ); - expect(entries).toContainEqual( - expect.objectContaining({ + id: entry.id, + name: entry.name, + reasoning: entry.reasoning, + input: [...entry.input], + contextWindow: entry.contextWindow, + })), + ...DOUBAO_CODING_MODEL_CATALOG.map((entry) => ({ provider: "volcengine-plan", - id: DOUBAO_CODING_MODEL_CATALOG[0].id, - name: DOUBAO_CODING_MODEL_CATALOG[0].name, - reasoning: DOUBAO_CODING_MODEL_CATALOG[0].reasoning, - input: [...DOUBAO_CODING_MODEL_CATALOG[0].input], - contextWindow: DOUBAO_CODING_MODEL_CATALOG[0].contextWindow, - }), - ); + id: entry.id, + name: entry.name, + reasoning: entry.reasoning, + input: [...entry.input], + contextWindow: entry.contextWindow, + })), + ]); }); it("declares its coding provider auth alias in the manifest", () => {