Merge pull request #1590 from open-gsd/chore/1589-worktree-test-escape-class
test: complete regex-escape class in worktree-safety assertion (#1589)
This commit is contained in:
@@ -642,7 +642,7 @@ describe('planWorktreeRecordAgent', () => {
|
|||||||
});
|
});
|
||||||
assert.equal(plan.reason, 'missing_field');
|
assert.equal(plan.reason, 'missing_field');
|
||||||
for (const flag of ['--agent-id', '--path', '--branch', '--base']) {
|
for (const flag of ['--agent-id', '--path', '--branch', '--base']) {
|
||||||
assert.match(plan.hint, new RegExp(flag.replace(/[-]/g, '\\$&')));
|
assert.match(plan.hint, new RegExp(flag.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user