Skip to content

Commit 5db7fb7

Browse files
Cover whitespace uppercase HTTPS baseURL acceptance
Co-authored-by: Eric Allam <eric@trigger.dev>
1 parent 7d3eac2 commit 5db7fb7

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
@@ -818,6 +818,17 @@ describe("TriggerChatTransport", function () {
818818
}).not.toThrow();
819819
});
820820

821+
it("accepts whitespace-wrapped uppercase https protocol in baseURL", function () {
822+
expect(function () {
823+
new TriggerChatTransport({
824+
task: "chat-task",
825+
accessToken: "pk_trigger",
826+
baseURL: " HTTPS://api.trigger.dev/custom-prefix/// ",
827+
stream: "chat-stream",
828+
});
829+
}).not.toThrow();
830+
});
831+
821832
it("accepts whitespace-wrapped uppercase http protocol in baseURL", function () {
822833
expect(function () {
823834
new TriggerChatTransport({
@@ -3211,6 +3222,17 @@ describe("TriggerChatTransport", function () {
32113222
}).not.toThrow();
32123223
});
32133224

3225+
it("accepts whitespace-wrapped uppercase https protocol from factory without throwing", function () {
3226+
expect(function () {
3227+
createTriggerChatTransport({
3228+
task: "chat-task",
3229+
accessToken: "pk_trigger",
3230+
baseURL: " HTTPS://api.trigger.dev/custom-prefix/// ",
3231+
stream: "chat-stream",
3232+
});
3233+
}).not.toThrow();
3234+
});
3235+
32143236
it("accepts uppercase http protocol from factory without throwing", function () {
32153237
expect(function () {
32163238
createTriggerChatTransport({

0 commit comments

Comments
 (0)