Skip to content

Commit e0af547

Browse files
committed
add test to make sure browser build works as commonJS module
1 parent d0fb87c commit e0af547

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

.travis.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,7 @@ script:
2929
npm run test
3030
else
3131
npm run test-browser
32+
# our browser build should also work fine as a Node.js CommonJS module
33+
node test/builds/browser_build_as_commonjs.js
3234
fi
3335
sudo: false # Use container-based architecture
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
const hljs = require("../../build/highlight");
2+
3+
let major = parseInt(majorVersion=hljs.versionString.split("."))
4+
if (major != 10) {
5+
process.exit(1)
6+
}

0 commit comments

Comments
 (0)