Skip to content

Commit 418c4fe

Browse files
authored
Add code coverage. (GoogleChrome#2637)
* Node coverage working. * Get karma to play nice with code coverage. * Get config for nyc/istanbul working.
1 parent 505255a commit 418c4fe

File tree

4 files changed

+776
-10
lines changed

4 files changed

+776
-10
lines changed

.nycrc

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
{
2+
"include": [
3+
"src/**/*.js",
4+
"shared/**/*.js",
5+
"./*.js"
6+
],
7+
"exclude": [
8+
"node_modules/**/*.js",
9+
"test/**/*.js",
10+
".eleventy.js",
11+
"karma.conf.js"
12+
]
13+
}

build.js

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ const rollupPluginCJS = require('rollup-plugin-commonjs');
2525
const rollupPluginPostCSS = require('rollup-plugin-postcss');
2626
const rollupPluginVirtual = require('rollup-plugin-virtual');
2727
const rollupPluginReplace = require('rollup-plugin-replace');
28+
const rollupPluginIstanbul = require('rollup-plugin-istanbul');
2829
const OMT = require('@surma/rollup-plugin-off-main-thread');
2930
const rollup = require('rollup');
3031
const terser = isProd ? require('terser') : null;
@@ -230,6 +231,7 @@ async function buildTest() {
230231
rollupPluginCJS(),
231232
rollupPluginVirtual(buildVirtualJSON(virtualImports)),
232233
rollupPluginPostCSS(),
234+
rollupPluginIstanbul(),
233235
],
234236
});
235237
await testBundle.write({

0 commit comments

Comments
 (0)