Completed
Push — master ( d8482c...7e89aa )
by Rafael
02:26 queued 55s
created

karma.config.js   A

Complexity

Total Complexity 1
Complexity/F 1

Size

Lines of Code 41
Function Count 1

Duplication

Duplicated Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
nc 1
dl 0
loc 41
rs 10
noi 1
cc 0
wmc 1
mnd 0
bc 1
fnc 1
bpm 1
cpm 1

1 Function

Rating   Name   Duplication   Size   Complexity  
B module.exports 0 38 1
1
// Karma configuration
2
const path = require( 'path' );
3
const src = path.resolve( __dirname, '..', 'src' );
0 ignored issues
show
Unused Code introduced by
The constant src seems to be never used. Consider removing it.
Loading history...
4
5
module.exports = function( config ) {
6
	config.set( {
7
		frameworks: [ 'jasmine', 'es6-shim' ],
8
		reporters: [ 'spec' ],
9
		browsers: [ 'PhantomJS' ],
10
		colors: true,
11
12
		// ... normal karma configuration
13
		files: [
14
			'node_modules/babel-polyfill/dist/polyfill.js',
15
			require.resolve( 'jquery' ),
16
			'https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js',
17
18
			// All files ending in "_test"
19
			// { pattern: 'test/*_test.js', watched: false }
20
21
			{ pattern: 'test/**/*_test.js', watched: false }
22
23
			// Each file acts as entry point for the webpack configuration
24
		],
25
26
		preprocessors: {
27
28
			// Add webpack as preprocessor
29
			'test/*_test.js': [ 'webpack' ],
30
			'test/**/*_test.js': [ 'webpack' ]
31
		},
32
33
		webpack: require( './config/webpack.test.js' ),
34
35
		webpackMiddleware: {
36
37
			// Webpack-dev-middleware configuration
38
			// i. e.
39
			stats: 'errors-only'
40
		}
41
	} );
42
};
43