fix(tests): escape '/' in forensics test regex literals (#123)

* fix(tests): escape '/' in forensics test regex literals

Closes #3855

* fix: add required type and pr fields to changeset frontmatter
This commit is contained in:
Tom Boucher
2026-05-22 13:16:47 -04:00
committed by GitHub
parent 2a915c1b82
commit 1f96da2488
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
type: Fixed
pr: 123
---
**Escape `/` in `forensics.test.cjs` regex literals** — two regexes at lines 153 and 163 contained unescaped `/` characters in `open-gsd/get-shit-done-redux`, causing a `SyntaxError: Invalid regular expression flags` at parse time on all platforms and blocking CI for every PR on the affected main state. Closes #3855.

View File

@@ -150,7 +150,7 @@ describe('forensics workflow', () => {
// contains the repo string.
assert.match(
content,
/gh issue create[\s\S]{0,250}--repo\s+open-gsd/get-shit-done-redux/,
/gh issue create[\s\S]{0,250}--repo\s+open-gsd\/get-shit-done-redux/,
'gh issue create must use --repo open-gsd/get-shit-done-redux to avoid submitting to the user\'s current project repo'
);
});
@@ -160,7 +160,7 @@ describe('forensics workflow', () => {
// Regex is more robust than a fixed-length slice to formatting changes
assert.match(
content,
/gh label list[\s\S]{0,250}--repo\s+open-gsd/get-shit-done-redux/,
/gh label list[\s\S]{0,250}--repo\s+open-gsd\/get-shit-done-redux/,
'gh label list must target open-gsd/get-shit-done-redux'
);
});