File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ var htmlToDOM = require('html-dom-parser');
4
4
5
5
// support backwards compatibility for ES Module
6
6
htmlToDOM =
7
+ /* istanbul ignore next */
7
8
typeof htmlToDOM . default === 'function' ? htmlToDOM . default : htmlToDOM ;
8
9
9
10
var domParserOptions = { lowerCaseAttributeNames : false } ;
Original file line number Diff line number Diff line change @@ -6,18 +6,23 @@ const { render } = require('./helpers');
6
6
describe ( 'module' , ( ) => {
7
7
it ( 'exports default' , ( ) => {
8
8
expect ( parse . default ) . toBe ( parse ) ;
9
+ expect ( parse . default ) . toBeInstanceOf ( Function ) ;
9
10
} ) ;
10
11
11
12
it ( 'exports domToReact' , ( ) => {
12
13
expect ( parse . domToReact ) . toBe ( require ( '../lib/dom-to-react' ) ) ;
14
+ expect ( parse . domToReact ) . toBeInstanceOf ( Function ) ;
13
15
} ) ;
14
16
15
17
it ( 'exports htmlToDOM' , ( ) => {
16
18
expect ( parse . htmlToDOM ) . toBe ( require ( 'html-dom-parser' ) ) ;
19
+ expect ( parse . htmlToDOM ) . toBeInstanceOf ( Function ) ;
20
+ expect ( parse . htmlToDOM . default ) . toBe ( undefined ) ;
17
21
} ) ;
18
22
19
23
it ( 'exports attributesToProps' , ( ) => {
20
24
expect ( parse . attributesToProps ) . toBe ( require ( '../lib/attributes-to-props' ) ) ;
25
+ expect ( parse . attributesToProps ) . toBeInstanceOf ( Function ) ;
21
26
} ) ;
22
27
} ) ;
23
28
You can’t perform that action at this time.
0 commit comments