Skip to content

Commit

Permalink
Add testing packages
Browse files Browse the repository at this point in the history
  • Loading branch information
Ant-f committed Oct 23, 2018
1 parent 30c3625 commit 432fd70
Show file tree
Hide file tree
Showing 3 changed files with 1,242 additions and 17 deletions.
38 changes: 38 additions & 0 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/* global module, require */

const webpackConfig = require('./webpack.config.js');

// Karma configuration
module.exports = function(config) {
config.set({
browsers: [ 'Chrome' ],
frameworks: [ 'mocha' ],

files: [
// each file acts as entry point for the webpack configuration
{ pattern: 'test/**/*.spec.js' },
{ pattern: 'test/**/*.spec.jsx' }
],

preprocessors: {
'**/*.js': ['webpack'],
'**/*.jsx': ['webpack']
},

webpack: {
module: webpackConfig.module,
resolve: webpackConfig.resolve
},

webpackMiddleware: {
stats: 'errors-only'
},

// See https://www.npmjs.com/package/karma-mocha
client: {
mocha: {
reporter: 'html'
}
}
});
};
Loading

0 comments on commit 432fd70

Please sign in to comment.