-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
38 lines (36 loc) · 961 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
const realBrowser = String(process.env.BROWSER).match(/^(1|true)$/gi);
const travisLaunchers = {
chrome_travis: {
base: 'Chrome',
flags: ['--no-sandbox']
}
};
const localBrowsers = realBrowser ? Object.keys(travisLaunchers) : ['Chrome'];
module.exports = (config) => {
config.set({
frameworks: ['jasmine', 'karma-typescript'],
plugins: [
'karma-jasmine',
'karma-chrome-launcher',
'karma-typescript',
'karma-spec-reporter'
],
karmaTypescriptConfig: {
tsconfig: './tsconfig.json'
},
client: {
clearContext: false
},
files: [{ pattern: 'src/**/*.ts' }, { pattern: 'test/**/*.spec.ts' }],
preprocessors: {
'src/**/*.ts': ['karma-typescript'],
'test/**/*.spec.ts': ['karma-typescript']
},
reporters: ['spec', 'karma-typescript'],
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: localBrowsers,
singleRun: true
});
};