Skip to content

Commit

Permalink
[FIX] Execution in IE11 (html mode)
Browse files Browse the repository at this point in the history
Pin istanbul-lib-coverage to 2.0.3 as newer versions break usage in IE.
This is only a temporary workaround. Babel should be introduced to
transpile all browser code to be compatible with IE11.

Add integration test execution with Internet Explorer.
Currently this needs to be executed manually (no CI integration).
  • Loading branch information
matz3 committed Sep 3, 2019
1 parent d808796 commit 7c793ae
Show file tree
Hide file tree
Showing 5 changed files with 36 additions and 5 deletions.
26 changes: 23 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
"unit": "jest test/framework.test.js",
"unit-coverage": "jest test/framework.test.js --coverage",
"integration": "jest test/integration.test.js",
"integration-internet-explorer": "jest test/integration.test.js --browsers=IE",
"dev": "webpack --watch --mode=development",
"prepare": "webpack",
"preversion": "npm test",
Expand Down Expand Up @@ -65,7 +66,7 @@
"eslint-plugin-jest": "^22.16.0",
"eslint-plugin-jsdoc": "^15.8.4",
"execa": "^2.0.4",
"istanbul-lib-coverage": "^2.0.5",
"istanbul-lib-coverage": "2.0.3",
"jest": "^24.9.0",
"karma": "^4.3.0",
"karma-chrome-launcher": "^3.1.0",
Expand Down
10 changes: 9 additions & 1 deletion test/integration.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,15 @@ const execa = require("execa");

const registerIntegrationTest = async (configPath) => {
it(configPath, async () => {
await execa("karma", ["start", path.join(__dirname, configPath)], {
const args = [
"start",
path.join(__dirname, configPath)
];
if (process.argv[process.argv.length - 1] === "--browsers=IE") {
// Allow switching to IE by passing a CLI arg
args.push("--browsers=IE");
}
await execa("karma", args, {
cwd: __dirname,
stdio: "inherit",
preferLocal: true // allow executing local karma binary
Expand Down
1 change: 1 addition & 0 deletions test/integration/karma-base.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ module.exports = function(config) {
require("../../"),
require("karma-coverage"),
require("karma-chrome-launcher"),
require("karma-ie-launcher"),
require("karma-qunit")
],

Expand Down
1 change: 1 addition & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ const allowedLicenses = [

module.exports = {
mode: "production",
devtool: "none",
entry: {
"browser-bundle": "./lib/client/browser.js"
},
Expand Down

0 comments on commit 7c793ae

Please sign in to comment.