Cover unicode-trimmable baseURL wrappers in acceptance tests

Co-authored-by: Eric Allam <eric@trigger.dev>
This commit is contained in:
Cursor Agent
2026-02-15 06:31:44 +00:00
parent 06322fdd62
commit f96b54598c
3 changed files with 50 additions and 0 deletions
+3
View File
@@ -668,6 +668,9 @@ Examples:
- ✅ ` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
- ✅ `https://api.trigger.dev/custom%20prefix` (percent-encoded whitespace)
- ✅ `https://api.trigger.dev/custom%3Fprefix%23segment` (percent-encoded `?` / `#`)
- ✅ `\u00A0https://api.trigger.dev/custom-prefix/\u00A0` (non-breaking-space wrapper trimmed)
- ✅ `\u1680https://api.trigger.dev/custom-prefix/\u1680` (ogham-space-mark wrapper trimmed)
- ✅ `\u3000https://api.trigger.dev/custom-prefix/\u3000` (ideographic-space wrapper trimmed)
- ✅ `\uFEFFhttps://api.trigger.dev/custom-prefix/\uFEFF` (BOM wrapper trimmed)
- ❌ `\u2060https://api.trigger.dev/custom-prefix/\u2060` (word-joiner wrappers are rejected)
- ❌ `\u200Bhttps://api.trigger.dev/custom-prefix/\u200B` (zero-width-space wrappers are rejected)
+3
View File
@@ -175,6 +175,9 @@ Examples:
-` https://api.trigger.dev/custom-prefix/// ` (trimmed + normalized)
-`https://api.trigger.dev/custom%20prefix` (percent-encoded whitespace)
-`https://api.trigger.dev/custom%3Fprefix%23segment` (percent-encoded `?` / `#`)
-`\u00A0https://api.trigger.dev/custom-prefix/\u00A0` (non-breaking-space wrapper trimmed)
-`\u1680https://api.trigger.dev/custom-prefix/\u1680` (ogham-space-mark wrapper trimmed)
-`\u3000https://api.trigger.dev/custom-prefix/\u3000` (ideographic-space wrapper trimmed)
-`\uFEFFhttps://api.trigger.dev/custom-prefix/\uFEFF` (BOM wrapper trimmed)
-`\u2060https://api.trigger.dev/custom-prefix/\u2060` (word-joiner wrappers are rejected)
-`\u200Bhttps://api.trigger.dev/custom-prefix/\u200B` (zero-width-space wrappers are rejected)
+44
View File
@@ -1204,6 +1204,28 @@ describe("TriggerChatTransport", function () {
}).not.toThrow();
});
it("accepts ogham-space-mark wrapped baseURL values", function () {
expect(function () {
new TriggerChatTransport({
task: "chat-task",
accessToken: "pk_trigger",
baseURL: "\u1680https://api.trigger.dev/custom-prefix/\u1680",
stream: "chat-stream",
});
}).not.toThrow();
});
it("accepts ideographic-space wrapped baseURL values", function () {
expect(function () {
new TriggerChatTransport({
task: "chat-task",
accessToken: "pk_trigger",
baseURL: "\u3000https://api.trigger.dev/custom-prefix/\u3000",
stream: "chat-stream",
});
}).not.toThrow();
});
it("accepts BOM-wrapped baseURL values", function () {
expect(function () {
new TriggerChatTransport({
@@ -4042,6 +4064,28 @@ describe("TriggerChatTransport", function () {
}).not.toThrow();
});
it("accepts ogham-space-mark wrapped baseURL values from factory", function () {
expect(function () {
createTriggerChatTransport({
task: "chat-task",
accessToken: "pk_trigger",
baseURL: "\u1680https://api.trigger.dev/custom-prefix/\u1680",
stream: "chat-stream",
});
}).not.toThrow();
});
it("accepts ideographic-space wrapped baseURL values from factory", function () {
expect(function () {
createTriggerChatTransport({
task: "chat-task",
accessToken: "pk_trigger",
baseURL: "\u3000https://api.trigger.dev/custom-prefix/\u3000",
stream: "chat-stream",
});
}).not.toThrow();
});
it("accepts BOM-wrapped baseURL values from factory", function () {
expect(function () {
createTriggerChatTransport({