Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 1 | const conf = require('./gulp.conf'); |
| 2 | |
| 3 | module.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 Scandolo | 40f8fa9 | 2016-12-07 09:21:35 -0800 | [diff] [blame] | 13 | // 'Chrome', |
| 14 | 'PhantomJS' |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 15 | ], |
| 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 Scandolo | 40f8fa9 | 2016-12-07 09:21:35 -0800 | [diff] [blame] | 28 | reporters: ['mocha', 'coverage'], |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 29 | 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 Scandolo | 40f8fa9 | 2016-12-07 09:21:35 -0800 | [diff] [blame] | 42 | require('karma-phantomjs-launcher'), |
| 43 | require('karma-mocha-reporter'), |
Matteo Scandolo | d819c92 | 2016-12-02 14:06:14 -0800 | [diff] [blame] | 44 | require('karma-webpack') |
| 45 | ] |
| 46 | }; |
| 47 | |
| 48 | config.set(configuration); |
| 49 | }; |