From 21ce6f3539f3d1504caba0eb996d625b54b69ea3 Mon Sep 17 00:00:00 2001 From: Tiago Schenkel Date: Thu, 15 Aug 2019 20:45:26 +0200 Subject: [PATCH] remove karma-remap-istanbul plugin --- karma.conf.js | 118 +++++++++++++++++++++++--------------------------- 1 file changed, 53 insertions(+), 65 deletions(-) diff --git a/karma.conf.js b/karma.conf.js index 6d9f46c..0f020e2 100644 --- a/karma.conf.js +++ b/karma.conf.js @@ -1,4 +1,4 @@ -const puppeteer = require('puppeteer'); +const puppeteer = require("puppeteer"); process.env.TEST = true; process.env.NODE_ENV = "test"; @@ -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); };