Skip to content

Instantly share code, notes, and snippets.

@meg-codes
Created January 11, 2019 16:06
Show Gist options
  • Save meg-codes/d9cfcac17e98a3c8e5e668678a5b56a3 to your computer and use it in GitHub Desktop.
Save meg-codes/d9cfcac17e98a3c8e5e668678a5b56a3 to your computer and use it in GitHub Desktop.
const webpackConf = require('./webpack.config.js')
const merge = require('webpack-merge')
module.exports = function (config) {
config.set({
browsers: [ 'ChromeHeadless' ], //run in Chrome
browserNoActivityTimeout: 60000,
frameworks: [ 'mocha', 'sinon-chai' ], //use the mocha test framework
files: [
//'src/**/*.{jsx,js}',
'sitemedia/js/index.js',
'mbgc/**/tests/js/*.spec.js'
],
preprocessors: {
'sitemedia/js/index.js': ['webpack'],
'mbgc/**/tests/js/*.spec.js': ['webpack']
},
reporters: [ 'mocha', 'coverage-istanbul' ], //report results in this format
mochaReporter: {
output: 'autowatch'
},
coverageIstanbulReporter: {
reports: ['html', 'text'],
fixWebpackSourcePaths: true,
skipFilesWithNoCoverage: true
},
webpack: merge.smart(webpackConf, {}),
webpackServer: {
noInfo: true //please don't spam the console when running in karma!
}
});
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment