diff --git a/packages/ai/src/chatTransport.test.ts b/packages/ai/src/chatTransport.test.ts index 717c32016..fc5ddba42 100644 --- a/packages/ai/src/chatTransport.test.ts +++ b/packages/ai/src/chatTransport.test.ts @@ -730,6 +730,17 @@ describe("TriggerChatTransport", function () { }).not.toThrow(); }); + it("accepts uppercase https protocol in baseURL", function () { + expect(function () { + new TriggerChatTransport({ + task: "chat-task", + accessToken: "pk_trigger", + baseURL: "HTTPS://api.trigger.dev/custom-prefix", + stream: "chat-stream", + }); + }).not.toThrow(); + }); + it("accepts uppercase http protocol in baseURL", async function () { let observedTriggerPath: string | undefined; let observedStreamPath: string | undefined; @@ -3024,6 +3035,17 @@ describe("TriggerChatTransport", function () { }).not.toThrow(); }); + it("accepts uppercase https protocol from factory without throwing", function () { + expect(function () { + createTriggerChatTransport({ + task: "chat-task", + accessToken: "pk_trigger", + baseURL: "HTTPS://api.trigger.dev/custom-prefix", + stream: "chat-stream", + }); + }).not.toThrow(); + }); + it("continues streaming when onTriggeredRun callback throws", async function () { let callbackCalled = false; const errors: TriggerChatTransportError[] = [];