Skip to content

Commit

Permalink
remove karma-remap-istanbul plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
tiagoschenkel committed Aug 15, 2019
1 parent 2a906eb commit 21ce6f3
Showing 1 changed file with 53 additions and 65 deletions.
118 changes: 53 additions & 65 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const puppeteer = require('puppeteer');
const puppeteer = require("puppeteer");

process.env.TEST = true;
process.env.NODE_ENV = "test";
Expand All @@ -9,71 +9,59 @@ const webpackConfig = require("./webpack.config.js")({ production: false, karma:
delete webpackConfig.entry;

module.exports = config => {
"use strict";
"use strict";

var configuration = {
basePath: "",
frameworks: [
"mocha",
"sinon-chai",
"es6-shim"
],
files: [
{ pattern: "./test/index.ts", include: true },
{ pattern: '**/*.map', served: true, included: false, watched: true }
],
preprocessors: {
"./test/index.ts": ["webpack"],
"./**/**/**/**.ts": ["sourcemap"]
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
plugins: [
"karma-webpack",
"karma-sourcemap-writer",
"karma-sourcemap-loader",
"karma-remap-istanbul",
"karma-mocha-reporter",
"karma-mocha",
"karma-sinon-chai",
"karma-es6-shim",
"karma-coverage-istanbul-reporter"
],
mime: {
"text/x-typescript": ["ts","tsx"]
},
reporters: (
config.singleRun ?
["dots", "mocha", "coverage-istanbul"] :
["dots", "mocha"]
),
coverageIstanbulReporter: {
reports: ["html", "lcov", "lcovonly", "text-summary"],
dir: "coverage",
fixWebpackSourcePaths: true,
"report-config": {
html: {
subdir: "html-report"
}
}
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [],
browserNoActivityTimeout: 50000
};
var configuration = {
basePath: "",
frameworks: ["mocha", "sinon-chai", "es6-shim"],
files: [{ pattern: "./test/index.ts", include: true }, { pattern: "**/*.map", served: true, included: false, watched: true }],
preprocessors: {
"./test/index.ts": ["webpack"],
"./**/**/**/**.ts": ["sourcemap"]
},
webpack: webpackConfig,
webpackMiddleware: {
noInfo: true
},
plugins: [
"karma-webpack",
"karma-sourcemap-writer",
"karma-sourcemap-loader",
"karma-mocha-reporter",
"karma-mocha",
"karma-sinon-chai",
"karma-es6-shim",
"karma-coverage-istanbul-reporter"
],
mime: {
"text/x-typescript": ["ts", "tsx"]
},
reporters: config.singleRun ? ["dots", "mocha", "coverage-istanbul"] : ["dots", "mocha"],
coverageIstanbulReporter: {
reports: ["html", "lcov", "lcovonly", "text-summary"],
dir: "coverage",
fixWebpackSourcePaths: true,
"report-config": {
html: {
subdir: "html-report"
}
}
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: [],
browserNoActivityTimeout: 50000
};

if (process.env.TRAVIS) {
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
} else {
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
}
if (process.env.TRAVIS) {
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
} else {
configuration.browsers.push("ChromeHeadless");
configuration.plugins.push("karma-chrome-launcher");
}

config.set(configuration);
config.set(configuration);
};

0 comments on commit 21ce6f3

Please sign in to comment.