forked from ngUpgraders/ng-forward
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
49 lines (41 loc) · 956 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
37
38
39
40
41
42
43
44
45
46
47
48
49
var tsConfig = require('./tsconfig.json');
tsConfig.compilerOptions.target = 'es5';
module.exports = function(config){
var options = {
basePath: 'dist',
browsers: ['Chrome'],
frameworks: ['angular', 'mocha', 'browserify', 'sinon-chai'],
reporters: ['mocha'],
angular: ['mocks'],
files: [
require.resolve('babel-core/browser-polyfill'),
'../node_modules/reflect-metadata/Reflect.js',
'lib/**/*.spec.js'
],
preprocessors: {
'lib/**/*.js': ['browserify']
},
browserify: {
watch: true,
noParse: [
// require.resolve('sinon-chai')
],
transform: [
['babelify', { stage: 0 }],
['aliasify', { aliases: {
'@reactivex/rxjs/dist/es6/Subject': '@reactivex/rxjs/dist/cjs/Subject'
}}]
]
},
customLaunchers: {
Chrome_travis_ci: {
base: 'Chrome',
flags: ['--no-sandbox']
}
}
};
if(process.env.TRAVIS){
options.browsers = ['Chrome_travis_ci'];
}
config.set(options);
};