forked from UUDigitalHumanitieslab/ts-xpath
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
42 lines (40 loc) · 1.24 KB
/
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
var typescriptConfig = require('./tsconfig.json');
typescriptConfig.compilerOptions.allowJs = true;
typescriptConfig.compilerOptions.declaration = false;
module.exports = function (config) {
let configuration = {
basePath: '',
frameworks: ['jasmine', 'karma-typescript'],
files: ['src/**/*.+(js|ts)'],
preprocessors: {
'src/**/*.+(js|ts)': ['karma-typescript']
},
reporters: ['progress', 'karma-typescript'],
browsers: ['PhantomJS'],
autoWatch: false,
singleRun: true,
plugins: [
'karma-chrome-launcher',
'karma-jasmine',
'karma-phantomjs-launcher',
'karma-typescript'
],
karmaTypescriptConfig: {
compilerOptions: typescriptConfig.compilerOptions,
bundlerOptions: {
entrypoints: /\.spec\.ts$/
}
},
browsers: ['ChromeHeadless'],
customLaunchers: {
Chrome_travis_ci: {
base: 'ChromeHeadless',
flags: ['--no-sandbox', '--disable-gpu']
}
}
}
if (process.env.TRAVIS) {
configuration.browsers = ['Chrome_travis_ci'];
}
config.set(configuration);
}