|
1 | 1 | describe.each([
|
2 |
| - ['unminified', '../../dist/html-react-parser'], |
3 |
| - ['minified', '../../dist/html-react-parser.min'] |
| 2 | + ['minified', '../../dist/html-react-parser.min'], |
| 3 | + ['unminified', '../../dist/html-react-parser'] |
4 | 4 | ])('UMD %s', (_type, path) => {
|
5 | 5 | const parse = require(path);
|
6 | 6 |
|
7 |
| - it('exports the parser', () => { |
| 7 | + it('exports parser', () => { |
8 | 8 | expect(parse).toBeInstanceOf(Function);
|
9 | 9 | });
|
10 | 10 |
|
11 | 11 | it('exports default', () => {
|
12 | 12 | expect(parse.default).toBeInstanceOf(Function);
|
13 | 13 | });
|
14 | 14 |
|
15 |
| - it('exports domToReact', () => { |
16 |
| - expect(parse.domToReact).toBeInstanceOf(Function); |
| 15 | + describe('internal', () => { |
| 16 | + it.each(['attributesToProps', 'domToReact', 'htmlToDOM'])( |
| 17 | + 'exports %s', |
| 18 | + name => { |
| 19 | + expect(parse[name]).toBeInstanceOf(Function); |
| 20 | + } |
| 21 | + ); |
17 | 22 | });
|
18 | 23 |
|
19 |
| - it('exports htmlToDOM', () => { |
20 |
| - expect(parse.htmlToDOM).toBeInstanceOf(Function); |
21 |
| - }); |
22 |
| - |
23 |
| - it('exports attributesToProps', () => { |
24 |
| - expect(parse.attributesToProps).toBeInstanceOf(Function); |
| 24 | + describe('domhandler', () => { |
| 25 | + it.each(['Comment', 'Element', 'ProcessingInstruction', 'Text'])( |
| 26 | + 'exports %s', |
| 27 | + name => { |
| 28 | + expect(parse[name]).toBeInstanceOf(Function); |
| 29 | + } |
| 30 | + ); |
25 | 31 | });
|
26 | 32 | });
|
0 commit comments