1 | // Karma configuration |
||
2 | const path = require( 'path' ); |
||
3 | const src = path.resolve( __dirname, '..', 'src' ); |
||
0 ignored issues
–
show
Unused Code
introduced
by
![]() |
|||
4 | |||
5 | // Currently using https://github.com/istanbuljs/babel-plugin-istanbul, |
||
6 | // Switch to: https://github.com/webpack-contrib/istanbul-instrumenter-loader |
||
7 | module.exports = function( config ) { |
||
8 | config.set( { |
||
9 | frameworks: [ 'jasmine', 'es6-shim' ], |
||
10 | reporters: [ 'spec', 'coverage' ], |
||
11 | browsers: [ 'PhantomJS' ], |
||
12 | colors: true, |
||
13 | |||
14 | // ... normal karma configuration |
||
15 | files: [ |
||
16 | 'node_modules/babel-polyfill/dist/polyfill.js', |
||
17 | require.resolve( 'jquery' ), |
||
18 | 'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js', |
||
19 | 'https://code.jquery.com/ui/1.12.1/jquery-ui.min.js', |
||
20 | 'node_modules/Iris/dist/iris.min.js', |
||
21 | |||
22 | // All files ending in "_test" |
||
23 | // { pattern: 'test/*_test.js', watched: false } |
||
24 | |||
25 | { pattern: 'test/**/*_test.js', watched: false } |
||
26 | |||
27 | // Each file acts as entry point for the webpack configuration |
||
28 | ], |
||
29 | |||
30 | preprocessors: { |
||
31 | |||
32 | // Add webpack as preprocessor |
||
33 | 'test/*_test.js': [ 'webpack', 'sourcemap' ], |
||
34 | 'test/**/*_test.js': [ 'webpack', 'sourcemap' ] |
||
35 | }, |
||
36 | |||
37 | // Optionally, configure the reporter |
||
38 | coverageReporter: { |
||
39 | type: 'html', |
||
40 | dir: 'coverage/', |
||
41 | reporters: [ |
||
42 | |||
43 | // Reporters not supporting the `file` property |
||
44 | { type: 'html', subdir: 'report-html' }, |
||
45 | { type: 'lcovonly', subdir: '.', file: 'report-lcovonly.txt' }, |
||
46 | { type: 'lcov', subdir: 'report-lcov' } |
||
47 | ] |
||
48 | }, |
||
49 | |||
50 | webpack: require( './config/webpack.test.js' ), |
||
51 | |||
52 | webpackMiddleware: { |
||
53 | |||
54 | // Webpack-dev-middleware configuration |
||
55 | // i. e. |
||
56 | stats: 'errors-only' |
||
57 | } |
||
58 | } ); |
||
59 | }; |
||
60 |