Skip to content

Commit 461b9ac

Browse files
committed
Use rollup-plugin-istanbul for coverage
1 parent b85a85a commit 461b9ac

File tree

3 files changed

+286
-6
lines changed

3 files changed

+286
-6
lines changed

karma.conf.js

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
/* eslint-disable import/no-commonjs */
22

33
const commonjs = require('@rollup/plugin-commonjs');
4+
const istanbul = require('rollup-plugin-istanbul');
45
const json = require('@rollup/plugin-json');
56
const resolve = require('@rollup/plugin-node-resolve').default;
67
const builds = require('./rollup.config');
78
const yargs = require('yargs');
89

9-
1010
module.exports = function(karma) {
1111
const args = yargs
1212
.option('verbose', {default: false})
@@ -101,12 +101,8 @@ module.exports = function(karma) {
101101
browserDisconnectTolerance: 3
102102
});
103103

104-
// https://swizec.com/blog/how-to-run-javascript-tests-in-chrome-on-travis/swizec/6647
105-
if (process.env.TRAVIS) {
106-
karma.customLaunchers.chrome.flags.push('--no-sandbox');
107-
}
108-
109104
if (args.coverage) {
105+
build.plugins.push(istanbul());
110106
karma.reporters.push('coverage');
111107
karma.coverageReporter = {
112108
dir: 'coverage/',

0 commit comments

Comments
 (0)