Commit 49555ca
fix(test): escape regex special characters in momus test file path
Escape regex special characters when building RegExp from file path in
momus.test.ts. The `.` characters in ".sisyphus/plans/plan.md" were matching
any character instead of literal dots.
Added escapeRegExp() helper and applied it when constructing the regex pattern.
All tests pass.
Co-Authored-By: Sisyphus <[email protected]>1 parent d9e82ca commit 49555ca
1 file changed
+8
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
4 | 8 | | |
5 | 9 | | |
6 | 10 | | |
| |||
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
33 | | - | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
34 | 41 | | |
35 | 42 | | |
36 | 43 | | |
| |||
0 commit comments