|
1 | 1 | import { parser } from '../src';
|
2 |
| -import { bold, plain, orderedList, listItem } from '../src/utils'; |
| 2 | +import { bold, plain, orderedList, orderedListItem } from '../src/utils'; |
3 | 3 |
|
4 | 4 | test.each([
|
5 | 5 | [
|
6 | 6 | `
|
7 |
| -1. First item |
| 7 | +7. First item |
8 | 8 | 2. Second item
|
9 |
| -3. Third item |
| 9 | +8. Third item |
10 | 10 | 4. *Fourth item*
|
| 11 | +15. *Fifteenth item* |
11 | 12 | `.trim(),
|
12 | 13 | [
|
13 | 14 | orderedList([
|
14 |
| - listItem([plain('First item')]), |
15 |
| - listItem([plain('Second item')]), |
16 |
| - listItem([plain('Third item')]), |
17 |
| - listItem([bold([plain('Fourth item')])]), |
| 15 | + orderedListItem('7', [plain('First item')]), |
| 16 | + orderedListItem('2', [plain('Second item')]), |
| 17 | + orderedListItem('8', [plain('Third item')]), |
| 18 | + orderedListItem('4', [bold([plain('Fourth item')])]), |
| 19 | + orderedListItem('15', [bold([plain('Fifteenth item')])]), |
18 | 20 | ]),
|
19 | 21 | ],
|
20 | 22 | ],
|
21 |
| - |
22 |
| - // [ |
23 |
| - // ` |
24 |
| - // 1. First item |
25 |
| - // 2. Second item |
26 |
| - // 3. Third item |
27 |
| - // 1. First item |
28 |
| - // 2. Second item |
29 |
| - // 4. *Fourth item* |
30 |
| - // `.trim(), |
31 |
| - // [ |
32 |
| - // orderedList([ |
33 |
| - // listItem([plain('First item')]), |
34 |
| - // listItem([plain('Second item')]), |
35 |
| - // listItem([plain('Third item')]), |
36 |
| - // listItem([bold([plain('Fourth item')])]), |
37 |
| - // ]), |
38 |
| - // ], |
39 |
| - // ], |
40 | 23 | ])('parses %p', (input, output) => {
|
41 | 24 | expect(parser(input)).toMatchObject(output);
|
42 | 25 | });
|
0 commit comments