This repository was archived by the owner on Aug 13, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathkarma.conf.js
More file actions
50 lines (48 loc) · 1.43 KB
/
karma.conf.js
File metadata and controls
50 lines (48 loc) · 1.43 KB
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
50
const webpackConfig = require('./webpack.config.js');
module.exports = function(config) {
const configuration = {
basePath: '',
frameworks: ['jasmine'],
files: [
'node_modules/angular/angular.js',
'node_modules/angular-translate/dist/angular-translate.js',
'node_modules/angular-mocks/angular-mocks.js',
'src/angular-phrase.ts',
'test/**/*.ts'
],
exclude: [],
preprocessors: {
'test/**/*.ts': ['webpack'],
'src/**/*.ts': ['webpack']
},
webpack: {
module: webpackConfig().module,
resolve: webpackConfig().resolve,
mode: "development"
},
webpackMiddleware: {
stats: 'errors-only'
},
reporters: ['spec'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
captureTimeout: 60000,
autoWatch: true,
browsers: [process.env.TRAVIS ? 'Firefox' : 'ChromeHeadless'],
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless'],
}
},
singleRun: false,
concurrency: Infinity,
};
// Detect CI environment using process.env.CI
if (process.env.CI) {
configuration.browsers = ['FirefoxHeadless'];
configuration.singleRun = true;
}
config.set(configuration);
};