forked from angular/angular-hint
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
36 lines (31 loc) · 1009 Bytes
/
karma.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
'use strict';
var sauceConfig = require('./config/karma.sauce.conf');
var travisConfig = require('./config/karma.travis.conf');
//var fs = require('fs');
//fs.readdirSync(__dirname + '/src/modules').filter
module.exports = function(config) {
var options = {
frameworks: ['browserify', 'jasmine'],
files: [
'node_modules/angular/angular.js',
'node_modules/angular-mocks/angular-mocks.js',
'hint.js',
{pattern: 'src/**/*.js', included: false, served: false, watched: true},
'test/*.spec.js'
],
preprocessors: {
'hint.js': ['browserify'],
//todo ethan - make this pattern less ugly
'test/{modules,getModule,getNgAppMod,getUndeclaredModules,getUnusedModules,hasNameSpace,inAttrsOrClasses,normalizeAttribute}.spec.js': ['browserify']
},
browsers: ['Chrome'],
browserify: {
debug: true
}
};
if (process.argv.indexOf('--sauce') > -1) {
sauceConfig(options);
travisConfig(options);
}
config.set(options);
};