File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change 28
28
"test001" : " node example.js" ,
29
29
"test002" : " ./node_modules/.bin/babel test/test-babel.js --out-file test/test-babel-out.js --source-maps && node test/test-babel-out.js" ,
30
30
"test003" : " node test/testtest.js" ,
31
- "test004" : " ./node_modules/.bin/babel index.js --out-file index-babel-out.js --source-maps && node index-babel-out.js" ,
32
- "test" : " npm run test001 && npm run test002 && npm run test003 && npm run test004 && npm run clean" ,
31
+ "test004" : " ./node_modules/.bin/babel test/testtest.js --out-file test/testtest-babel-out.js --source-maps && node test/testtest-babel-out.js" ,
32
+ "test005" : " ./node_modules/.bin/babel index.js --out-file index-babel-out.js --source-maps && node index-babel-out.js" ,
33
+ "test" : " npm run test001 && npm run test002 && npm run test003 && npm run test004 && npm run test005 && npm run clean" ,
33
34
"clean" : " rm **/*-babel-out.* && rm *-babel-out.*" ,
34
35
"pub" : " npm publish --access public"
35
36
},
Original file line number Diff line number Diff line change 16
16
17
17
// tests which serve as simple better-assert library unit tests:
18
18
console . log ( "\n\n==================================\n\n## Unit Tests for the library ##\n\n" ) ;
19
-
20
- assert ( ex . message . indexOf ( "(a==b,`${a} should be ${b}`) 1 should be 2" ) >= 0 ) ;
19
+
20
+ assert (
21
+ // this check will match when run directly in node (v8, v10, ...)
22
+ ex . message . indexOf ( "(a==b,`${a} should be ${b}`) 1 should be 2" ) >= 0 ||
23
+ // while this check will match when run via a babel transpile (which prettyfies the code)
24
+ ex . message . indexOf ( "(a == b, `${a} should be ${b}`) 1 should be 2" ) >= 0 ) ;
21
25
assert ( ex . name . indexOf ( "AssertionError" ) === 0 ) ;
22
26
23
27
console . log ( "PASS OK" ) ;
You can’t perform that action at this time.
0 commit comments