Skip to content

Commit c970ff0

Browse files
Cover uppercase HTTPS baseURL acceptance paths
Co-authored-by: Eric Allam <eric@trigger.dev>
1 parent cb701f2 commit c970ff0

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/ai/src/chatTransport.test.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -730,6 +730,17 @@ describe("TriggerChatTransport", function () {
730730
}).not.toThrow();
731731
});
732732

733+
it("accepts uppercase https protocol in baseURL", function () {
734+
expect(function () {
735+
new TriggerChatTransport({
736+
task: "chat-task",
737+
accessToken: "pk_trigger",
738+
baseURL: "HTTPS://api.trigger.dev/custom-prefix",
739+
stream: "chat-stream",
740+
});
741+
}).not.toThrow();
742+
});
743+
733744
it("accepts uppercase http protocol in baseURL", async function () {
734745
let observedTriggerPath: string | undefined;
735746
let observedStreamPath: string | undefined;
@@ -3024,6 +3035,17 @@ describe("TriggerChatTransport", function () {
30243035
}).not.toThrow();
30253036
});
30263037

3038+
it("accepts uppercase https protocol from factory without throwing", function () {
3039+
expect(function () {
3040+
createTriggerChatTransport({
3041+
task: "chat-task",
3042+
accessToken: "pk_trigger",
3043+
baseURL: "HTTPS://api.trigger.dev/custom-prefix",
3044+
stream: "chat-stream",
3045+
});
3046+
}).not.toThrow();
3047+
});
3048+
30273049
it("continues streaming when onTriggeredRun callback throws", async function () {
30283050
let callbackCalled = false;
30293051
const errors: TriggerChatTransportError[] = [];

0 commit comments

Comments
 (0)