-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathkarma-shared.conf.js
45 lines (37 loc) · 1.11 KB
/
karma-shared.conf.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
'use strict';
var path = require('path');
var fs = require('fs');
var index = fs.readFileSync(path.normalize(__dirname + '/../app/index.html'), 'utf8');
var re = /src="bower_components[^"]+"/g;
var bower_scripts = index.match(re).map(function(src) {
return src.replace('src="','app/').replace('"','');
});
module.exports = function() {
return {
basePath: '../',
frameworks: ['mocha','sinon-chai', 'sinon', 'chai'],
browsers: ['PhantomJS'],
autoWatch: true,
reporters: ['dots', 'coverage'],
// plugins: ['karma-chrome-launcher','karma-mocha','karma-coverage'],
// tell karma how you want the coverage results
coverageReporter: {
type : 'html',
// where to store the report
dir : 'coverage/'
},
// these are default values anyway
singleRun: false,
colors: true,
files : bower_scripts.concat([
//App-specific Code
'src/**/*.js',
'app/scripts/app.js',
//Test-Specific Code
'node_modules/chai/chai.js',
'node_modules/sinon/pkg/sinon.js',
'test/lib/chai-should.js',
'test/lib/chai-expect.js'
])
};
};