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:
Tibsfox 2026-04-06 22:55:55 -07:00
parent ef68e37e79
commit fa344e79a0

View file

@ -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');
});