test: re-run the test suite on the minified file on travis
This commit is contained in:
parent
9a38d923e9
commit
96cfb9c5c2
|
@ -6,7 +6,8 @@ node_js:
|
|||
|
||||
script:
|
||||
- npm run build
|
||||
- COVERAGE=y npm run test-coverage
|
||||
- npm run test-coverage
|
||||
- echo "RE-RUN all tests on the minified file" && npm run test-minified
|
||||
|
||||
after_script: npm run publish-coverage
|
||||
|
||||
|
|
|
@ -43,9 +43,10 @@
|
|||
},
|
||||
"scripts": {
|
||||
"build": "grunt",
|
||||
"prepublish": "npm run build && npm run test",
|
||||
"publish-coverage": "grunt coveralls",
|
||||
"test": "mocha",
|
||||
"test-coverage": "COVERAGE=y nyc mocha",
|
||||
"publish-coverage": "grunt coveralls",
|
||||
"prepublish": "npm run build && npm run test"
|
||||
"test-minified": "TEST_MINIFIED_POLYFILL=1 mocha"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -13,7 +13,8 @@ if (process.env.ENABLE_JSDOM_CONSOLE == "y") {
|
|||
|
||||
// Path to the browser-polyfill script, relative to the current work dir
|
||||
// where mocha is executed.
|
||||
const BROWSER_POLYFILL_PATH = "./dist/browser-polyfill.js";
|
||||
const BROWSER_POLYFILL_PATH = process.env.TEST_MINIFIED_POLYFILL ?
|
||||
"./dist/browser-polyfill.min.js" : "./dist/browser-polyfill.js";
|
||||
|
||||
// Create the jsdom window used to run the tests
|
||||
const testDOMWindow = jsdom("", {virtualConsole}).defaultView;
|
||||
|
|
Loading…
Reference in New Issue