blob: b7e44ab21e13dbe970620f6e59e2f4c8c7a3cb75 [file] [log] [blame]
Matteo Scandolod819c922016-12-02 14:06:14 -08001const conf = require('./gulp.conf');
2
3module.exports = function (config) {
4 const configuration = {
5 basePath: '../',
6 singleRun: false,
7 autoWatch: true,
8 logLevel: 'INFO',
9 junitReporter: {
10 outputDir: 'test-reports'
11 },
12 browsers: [
Matteo Scandolo40f8fa92016-12-07 09:21:35 -080013 // 'Chrome',
14 'PhantomJS'
Matteo Scandolod819c922016-12-02 14:06:14 -080015 ],
16 frameworks: [
17 'jasmine'
18 ],
19 files: [
20 'node_modules/es6-shim/es6-shim.js',
21 conf.path.src('index.spec.js')
22 ],
23 preprocessors: {
24 [conf.path.src('index.spec.js')]: [
25 'webpack'
26 ]
27 },
Matteo Scandolo40f8fa92016-12-07 09:21:35 -080028 reporters: ['mocha', 'coverage'],
Matteo Scandolod819c922016-12-02 14:06:14 -080029 coverageReporter: {
30 type: 'html',
31 dir: 'coverage/'
32 },
33 webpack: require('./webpack-test.conf'),
34 webpackMiddleware: {
35 noInfo: true
36 },
37 plugins: [
38 require('karma-jasmine'),
39 require('karma-junit-reporter'),
40 require('karma-coverage'),
41 require('karma-chrome-launcher'),
Matteo Scandolo40f8fa92016-12-07 09:21:35 -080042 require('karma-phantomjs-launcher'),
43 require('karma-mocha-reporter'),
Matteo Scandolod819c922016-12-02 14:06:14 -080044 require('karma-webpack')
45 ]
46 };
47
48 config.set(configuration);
49};