forked from coveo/search-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.unit.test.conf.js
51 lines (48 loc) · 1.47 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
const ChromiumRevision = require('puppeteer/package.json').puppeteer.chromium_revision;
const Downloader = require('puppeteer/utils/ChromiumDownloader');
const revisionInfo = Downloader.revisionInfo(Downloader.currentPlatform(), ChromiumRevision);
process.env.CHROME_BIN = revisionInfo.executablePath;
var configuration = {
singleRun: true,
browsers: ['ChromeHeadless'],
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);
};