Skip to content

Commit 7d8b3c3

Browse files
committed
test: Check current behaviour of TaskRegularExpressions.listMarkerRegex
1 parent 2b852db commit 7d8b3c3

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
import { TaskRegularExpressions } from '../../src/Task/TaskRegularExpressions';
2+
3+
describe('List Markers', () => {
4+
it.each([
5+
// split list
6+
'-',
7+
'*',
8+
'+',
9+
'0.',
10+
'1.',
11+
'12345.',
12+
])('should be a valid list marker: "%s"', (candidate: string) => {
13+
expect(TaskRegularExpressions.listMarkerRegex.exec(candidate)).not.toBeNull();
14+
});
15+
16+
it.each([
17+
// split list
18+
'%',
19+
'.',
20+
')',
21+
'0)',
22+
'1)',
23+
'12345)',
24+
])('should NOT be a valid list marker: "%s"', (candidate: string) => {
25+
expect(TaskRegularExpressions.listMarkerRegex.exec(candidate)).toBeNull();
26+
});
27+
});

0 commit comments

Comments
 (0)