-
Notifications
You must be signed in to change notification settings - Fork 77
/
karma.unit.test.conf.js
58 lines (55 loc) · 1.41 KB
/
karma.unit.test.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
50
51
52
53
54
55
56
57
58
const puppeteer = require('puppeteer');
process.env.CHROME_BIN = puppeteer.executablePath();
const configuration = {
singleRun: true,
browsers: ['ChromeHeadlessNoSandbox'],
customLaunchers: {
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
frameworks: ['jasmine'],
browserDisconnectTimeout: 120000,
browserNoActivityTimeout: 120000,
captureTimeout: 120000,
processKillTimeout: 120000,
browserDisconnectTolerance: 10,
files: [
{
pattern: './node_modules/es6-promise/dist/es6-promise.auto.js',
watched: false
},
{
pattern: './testsFramework/lib/jasmine-ajax/jasmine-ajax.js',
watched: false
},
{
pattern: 'https://cdnjs.cloudflare.com/ajax/libs/ag-grid/16.0.1/ag-grid.min.noStyle.js',
watched: false
},
{
pattern: './bin/js/CoveoJsSearch.js',
watched: true
},
{
pattern: './bin/tests/unitTests.js',
watched: true
}
],
plugins: ['karma-jasmine', 'karma-chrome-launcher', 'karma-coverage', 'karma-spec-reporter'],
preprocessors: {
'./bin/tests/unitTests.js': 'coverage'
},
reporters: ['coverage', 'spec'],
coverageReporter: {
dir: './bin/coverage',
reporters: [
{ type: 'json', subdir: '.', file: 'coverage-es5.json' },
{ type: 'lcov', subdir: 'lcov-es5' }
]
}
};
module.exports = function (config) {
config.set(configuration);
};