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');
44
55// support backwards compatibility for ES Module
66htmlToDOM =
7+ /* istanbul ignore next */
78 typeof htmlToDOM . default === 'function' ? htmlToDOM . default : htmlToDOM ;
89
910var domParserOptions = { lowerCaseAttributeNames : false } ;
Original file line number Diff line number Diff line change @@ -6,18 +6,23 @@ const { render } = require('./helpers');
66describe ( 'module' , ( ) => {
77 it ( 'exports default' , ( ) => {
88 expect ( parse . default ) . toBe ( parse ) ;
9+ expect ( parse . default ) . toBeInstanceOf ( Function ) ;
910 } ) ;
1011
1112 it ( 'exports domToReact' , ( ) => {
1213 expect ( parse . domToReact ) . toBe ( require ( '../lib/dom-to-react' ) ) ;
14+ expect ( parse . domToReact ) . toBeInstanceOf ( Function ) ;
1315 } ) ;
1416
1517 it ( 'exports htmlToDOM' , ( ) => {
1618 expect ( parse . htmlToDOM ) . toBe ( require ( 'html-dom-parser' ) ) ;
19+ expect ( parse . htmlToDOM ) . toBeInstanceOf ( Function ) ;
20+ expect ( parse . htmlToDOM . default ) . toBe ( undefined ) ;
1721 } ) ;
1822
1923 it ( 'exports attributesToProps' , ( ) => {
2024 expect ( parse . attributesToProps ) . toBe ( require ( '../lib/attributes-to-props' ) ) ;
25+ expect ( parse . attributesToProps ) . toBeInstanceOf ( Function ) ;
2126 } ) ;
2227} ) ;
2328
You can’t perform that action at this time.
0 commit comments