File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 19
19
- run : npm run lint
20
20
- run : npm run lint:dts
21
21
- run : npm run test:ci
22
- - run : npm run build
22
+ - run : npm run test:integration
23
23
- run : npm run benchmark
24
24
- name : Coveralls
25
25
uses : coverallsapp/github-action@master
Original file line number Diff line number Diff line change 7
7
"module" : " index.mjs" ,
8
8
"scripts" : {
9
9
"benchmark" : " node benchmark" ,
10
- "build" : " rollup --config" ,
10
+ "build" : " rollup --config --failAfterWarnings " ,
11
11
"clean" : " rimraf dist" ,
12
12
"lint" : " eslint --ignore-path .gitignore --ignore-pattern /examples/ ." ,
13
13
"lint:dts" : " dtslint ." ,
14
14
"lint:fix" : " npm run lint -- --fix" ,
15
15
"prepublishOnly" : " npm run lint && npm run lint:dts && npm run test:ci && npm run clean && npm run build" ,
16
16
"release" : " standard-version --no-verify" ,
17
- "test" : " jest --coverage" ,
17
+ "test" : " jest --coverage --testPathIgnorePatterns test/integration/ " ,
18
18
"test:ci" : " npm test -- --ci" ,
19
+ "test:integration" : " npm run build && jest test/integration/" ,
19
20
"test:watch" : " npm test -- --watch"
20
21
},
21
22
"repository" : {
Original file line number Diff line number Diff line change
1
+ describe . each ( [
2
+ [ 'unminified' , '../../dist/html-react-parser' ] ,
3
+ [ 'minified' , '../../dist/html-react-parser.min' ]
4
+ ] ) ( 'UMD %s' , ( _type , path ) => {
5
+ const parse = require ( path ) ;
6
+
7
+ it ( 'exports the parser' , ( ) => {
8
+ expect ( parse ) . toBeInstanceOf ( Function ) ;
9
+ } ) ;
10
+
11
+ it ( 'exports default' , ( ) => {
12
+ expect ( parse . default ) . toBeInstanceOf ( Function ) ;
13
+ } ) ;
14
+
15
+ it ( 'exports domToReact' , ( ) => {
16
+ expect ( parse . domToReact ) . toBeInstanceOf ( Function ) ;
17
+ } ) ;
18
+
19
+ it ( 'exports htmlToDOM' , ( ) => {
20
+ expect ( parse . htmlToDOM ) . toBeInstanceOf ( Function ) ;
21
+ } ) ;
22
+
23
+ it ( 'exports attributesToProps' , ( ) => {
24
+ expect ( parse . attributesToProps ) . toBeInstanceOf ( Function ) ;
25
+ } ) ;
26
+ } ) ;
You can’t perform that action at this time.
0 commit comments