Skip to content

Commit efba1d4

Browse files
test(html-to-react): add test to ensure default export for parser
1 parent 6259959 commit efba1d4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

test/html-to-react.js

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,9 @@ const React = require('react');
33
const parse = require('../');
44
const { data, render } = require('./helpers/');
55

6+
exports.__esModule = true;
7+
const ESParser = require('../');
8+
69
describe('html-to-react', () => {
710
describe('parser', () => {
811
[undefined, null, {}, [], 42].forEach(value => {
@@ -13,6 +16,10 @@ describe('html-to-react', () => {
1316
});
1417
});
1518

19+
it('has default ES Module defined', () => {
20+
assert.notEqual(ESParser['default'], undefined);
21+
});
22+
1623
it('returns string if it cannot be parsed as HTML', () => {
1724
assert.equal(parse('foo'), 'foo');
1825
});

0 commit comments

Comments
 (0)