fix(test): escape regex metacharacters in skip-by-preference pattern test
The test regex used unescaped (?:...) groups which were interpreted as regex syntax instead of matching the literal source text. Escape parens to match the actual regex pattern in the source code. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
ef68e37e79
commit
fa344e79a0
1 changed files with 1 additions and 1 deletions
|
|
@ -28,7 +28,7 @@ describe('skipped validation completion (#3698)', () => {
|
|||
});
|
||||
|
||||
test('regex matches skip-by-preference patterns', () => {
|
||||
assert.match(autoDispatchSrc, /skip(?:ped)?\[\\s\\-\]\+(?:by\|per\|due to)/,
|
||||
assert.match(autoDispatchSrc, /skip\(\?:ped\)\?\[\\s\\-\]\+\(\?:by\|per\|due to\)/,
|
||||
'should have regex matching "skipped by/per/due to" patterns');
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue