Cover uppercase HTTPS baseURL acceptance paths

Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
Cursor Agent
2026-02-15 04:39:21 +00:00
parent cb701f2f62
commit c970ff0be8
+22
View File
@@ -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[] = [];