Cover uppercase HTTPS baseURL acceptance paths
Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
@@ -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[] = [];
|
||||
|
||||
Reference in New Issue
Block a user