forked from coveo/search-ui
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.accessibility.test.conf.js
47 lines (44 loc) · 1.23 KB
/
karma.accessibility.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
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;
/**
* @type {import('karma').ConfigOptions}
*/
var configuration = {
singleRun: true,
browsers: ['ChromeHeadless-Accessibility'],
frameworks: ['jasmine'],
browserNoActivityTimeout: 90000,
browserDisconnectTolerance: 10,
files: [
{
pattern: './bin/tests/lib/axe.js',
watched: false
},
{
pattern: './bin/css/CoveoFullSearch.css',
type: 'css',
watched: true
},
{
pattern: './bin/js/CoveoJsSearch.js',
watched: true
},
{
pattern: './bin/tests/accessibilityTests.js',
watched: true
}
],
reporters: ['spec'],
plugins: ['karma-jasmine', 'karma-chrome-launcher', 'karma-spec-reporter'],
customLaunchers: {
'ChromeHeadless-Accessibility': {
base: 'Chrome',
flags: ['--headless', '--remote-debugging-port=9222', '--no-sandbox', '--max_old_space_size=4096']
}
}
};
module.exports = function(config) {
config.set(configuration);
};