Skip to content

Commit 81503ba

Browse files
author
root
committed
Fix transport refusal regression test typing
1 parent e78290e commit 81503ba

1 file changed

Lines changed: 11 additions & 9 deletions

File tree

src/agents/openai-transport-stream.test.ts

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -685,15 +685,17 @@ describe("openai transport stream", () => {
685685
expect(output.stopReason).toBe("error");
686686
expect(output.content).toEqual([]);
687687
expect(output.errorMessage).toBe("OpenAI refusal: Tool use is not allowed.");
688-
expect(output.diagnostics).toEqual([
689-
expect.objectContaining({
690-
type: "provider_refusal",
691-
details: {
692-
provider: model.provider,
693-
explanation: "Tool use is not allowed.",
694-
},
695-
}),
696-
]);
688+
expect(output).toMatchObject({
689+
diagnostics: [
690+
expect.objectContaining({
691+
type: "provider_refusal",
692+
details: {
693+
provider: model.provider,
694+
explanation: "Tool use is not allowed.",
695+
},
696+
}),
697+
],
698+
});
697699
expect(pushSpy.mock.calls.map(([event]) => (event as { type?: string }).type)).toEqual([
698700
"toolcall_start",
699701
"toolcall_delta",

0 commit comments

Comments
 (0)