Skip to content

Commit a1bcadc

Browse files
committed
remove remap-istanbul dependency
1 parent e221787 commit a1bcadc

File tree

3 files changed

+80
-566
lines changed

3 files changed

+80
-566
lines changed

karma.conf.js

Lines changed: 58 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const puppeteer = require('puppeteer');
1+
const puppeteer = require("puppeteer");
22

33
process.env.TEST = true;
44
process.env.NODE_ENV = "test";
@@ -9,73 +9,64 @@ const webpackConfig = require("./webpack.config.js")({ production: false, karma:
99
delete webpackConfig.entry;
1010

1111
module.exports = config => {
12-
"use strict";
12+
"use strict";
1313

14-
var configuration = {
15-
basePath: "",
16-
frameworks: [
17-
"mocha",
18-
"sinon-chai",
19-
"es6-shim"
20-
],
21-
files: [
22-
{ pattern: "node_modules/reflect-metadata/Reflect.js", include: true },
23-
{ pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true },
24-
{ pattern: "./test/index.ts", include: true },
25-
{ pattern: '**/*.map', served: true, included: false, watched: true }
26-
],
27-
preprocessors: {
28-
"./test/index.ts": ["webpack"],
29-
"./**/**/**/**.ts": ["sourcemap"]
30-
},
31-
webpack: webpackConfig,
32-
webpackMiddleware: {
33-
noInfo: true
34-
},
35-
plugins: [
36-
"karma-webpack",
37-
"karma-sourcemap-writer",
38-
"karma-sourcemap-loader",
39-
"karma-remap-istanbul",
40-
"karma-mocha-reporter",
41-
"karma-mocha",
42-
"karma-sinon-chai",
43-
"karma-es6-shim",
44-
"karma-coverage-istanbul-reporter"
45-
],
46-
mime: {
47-
"text/x-typescript": ["ts","tsx"]
48-
},
49-
reporters: (
50-
config.singleRun ?
51-
["dots", "mocha", "coverage-istanbul"] :
52-
["dots", "mocha"]
53-
),
54-
coverageIstanbulReporter: {
55-
reports: ["html", "lcov", "lcovonly", "text-summary"],
56-
dir: "coverage",
57-
fixWebpackSourcePaths: true,
58-
"report-config": {
59-
html: {
60-
subdir: "html-report"
61-
}
62-
}
63-
},
64-
port: 9876,
65-
colors: true,
66-
logLevel: config.LOG_INFO,
67-
autoWatch: true,
68-
browsers: [],
69-
browserNoActivityTimeout: 50000
70-
};
14+
var configuration = {
15+
basePath: "",
16+
frameworks: ["mocha", "sinon-chai", "es6-shim"],
17+
files: [
18+
{ pattern: "node_modules/reflect-metadata/Reflect.js", include: true },
19+
{ pattern: "node_modules/bluebird/js/browser/bluebird.js", include: true },
20+
{ pattern: "./test/index.ts", include: true },
21+
{ pattern: "**/*.map", served: true, included: false, watched: true }
22+
],
23+
preprocessors: {
24+
"./test/index.ts": ["webpack"],
25+
"./**/**/**/**.ts": ["sourcemap"]
26+
},
27+
webpack: webpackConfig,
28+
webpackMiddleware: {
29+
noInfo: true
30+
},
31+
plugins: [
32+
"karma-webpack",
33+
"karma-sourcemap-writer",
34+
"karma-sourcemap-loader",
35+
"karma-mocha-reporter",
36+
"karma-mocha",
37+
"karma-sinon-chai",
38+
"karma-es6-shim",
39+
"karma-coverage-istanbul-reporter"
40+
],
41+
mime: {
42+
"text/x-typescript": ["ts", "tsx"]
43+
},
44+
reporters: config.singleRun ? ["dots", "mocha", "coverage-istanbul"] : ["dots", "mocha"],
45+
coverageIstanbulReporter: {
46+
reports: ["html", "lcov", "lcovonly", "text-summary"],
47+
dir: "coverage",
48+
fixWebpackSourcePaths: true,
49+
"report-config": {
50+
html: {
51+
subdir: "html-report"
52+
}
53+
}
54+
},
55+
port: 9876,
56+
colors: true,
57+
logLevel: config.LOG_INFO,
58+
autoWatch: true,
59+
browsers: [],
60+
browserNoActivityTimeout: 50000
61+
};
7162

72-
if (process.env.TRAVIS) {
73-
configuration.browsers.push("ChromeHeadless");
74-
configuration.plugins.push("karma-chrome-launcher");
75-
} else {
76-
configuration.browsers.push("ChromeHeadless");
77-
configuration.plugins.push("karma-chrome-launcher");
78-
}
63+
if (process.env.TRAVIS) {
64+
configuration.browsers.push("ChromeHeadless");
65+
configuration.plugins.push("karma-chrome-launcher");
66+
} else {
67+
configuration.browsers.push("ChromeHeadless");
68+
configuration.plugins.push("karma-chrome-launcher");
69+
}
7970

80-
config.set(configuration);
71+
config.set(configuration);
8172
};

package.json

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,6 @@
9595
"karma-es6-shim": "^1.0.0",
9696
"karma-mocha": "^1.3.0",
9797
"karma-mocha-reporter": "^2.2.5",
98-
"karma-remap-istanbul": "^0.6.0",
9998
"karma-sinon-chai": "^2.0.2",
10099
"karma-sourcemap-loader": "^0.3.7",
101100
"karma-sourcemap-writer": "^0.1.2",
@@ -106,7 +105,6 @@
106105
"publish-please": "^5.4.3",
107106
"puppeteer": "^1.13.0",
108107
"reflect-metadata": "^0.1.13",
109-
"remap-istanbul": "^0.13.0",
110108
"rimraf": "^2.6.3",
111109
"sinon": "^7.3.0",
112110
"sinon-chai": "^3.3.0",

0 commit comments

Comments
 (0)