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:
5
.changeset/forensics-regex-escape.md
Normal file
5
.changeset/forensics-regex-escape.md
Normal 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.
|
||||||
@@ -150,7 +150,7 @@ describe('forensics workflow', () => {
|
|||||||
// contains the repo string.
|
// contains the repo string.
|
||||||
assert.match(
|
assert.match(
|
||||||
content,
|
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'
|
'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
|
// Regex is more robust than a fixed-length slice to formatting changes
|
||||||
assert.match(
|
assert.match(
|
||||||
content,
|
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'
|
'gh label list must target open-gsd/get-shit-done-redux'
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user