Skip to content

Commit

Permalink
chore: add coverage reports for browser tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Trott committed May 30, 2020
1 parent 2729c2b commit b9cb68d
Show file tree
Hide file tree
Showing 4 changed files with 1,106 additions and 291 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
*~
*.swp
.lock-wscript
.nyc_output
coverage/
node_modules/
coverage/
45 changes: 26 additions & 19 deletions .karma.config.js
Original file line number Diff line number Diff line change
@@ -1,22 +1,29 @@
module.exports = function (config) {
config.set({
frameworks: ['mocha', 'chai'],
files: [
'slug.js',
'test/**/*.js'
],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless', 'Firefox'],
autoWatch: false,
concurrency: Infinity,
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless'],
},
},
frameworks: ['mocha', 'chai'],
files: [
'slug.js',
'test/**/*.js'
],
preprocessors: { 'slug.js': 'coverage' },
reporters: ['coverage'],
coverageReporter: {
dir: '.nyc_output',
reporters: [
{ type: 'json', subdir: '.', file: 'karma.json' }
]
},
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless', 'Firefox'],
autoWatch: false,
concurrency: Infinity,
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless']
}
}
})
}
}

0 comments on commit b9cb68d

Please sign in to comment.