Skip to content

Commit eaee809

Browse files
committed
test: add arg-parsing explicit-org-suffix URL path test
Add test for parseIssueArg with a Sentry URL containing a no-dash issue ID (e.g., /issues/G/) — exercises the explicit-org-suffix path in issueArgFromUrl (lines 445-453 of arg-parsing.ts).
1 parent 568dec3 commit eaee809

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

test/lib/arg-parsing.test.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -543,6 +543,18 @@ describe("parseIssueArg", () => {
543543
baseUrl: "https://sentry.example.com",
544544
});
545545
});
546+
547+
test("issue URL with no-dash short ID returns explicit-org-suffix", () => {
548+
// URL with issue ID that has no dash — rare, but handled gracefully.
549+
// issueArgFromUrl: issueId="G" (no digits, no dash) → explicit-org-suffix
550+
expect(
551+
parseIssueArg("https://sentry.io/organizations/my-org/issues/G/")
552+
).toEqual({
553+
type: "explicit-org-suffix",
554+
org: "my-org",
555+
suffix: "G",
556+
});
557+
});
546558
});
547559

548560
// Parser preserves DSN-style org identifiers (normalization moved to resolution layer)

0 commit comments

Comments
 (0)