-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
36 lines (34 loc) · 971 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
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-typescript',
'karma-chrome-launcher',
'karma-jasmine-html-reporter',
'karma-spec-reporter'
],
client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
files: [{ pattern: 'src/**/*.ts' }, { pattern: 'tests/**/*.spec.ts' }],
preprocessors: {
'**/*.ts': ['karma-typescript'],
'tests/**/*.spec.ts': ['karma-typescript']
},
reporters: ['progress', 'kjhtml'],
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: localBrowsers,
singleRun: false
})
}