-
Notifications
You must be signed in to change notification settings - Fork 20
/
Copy pathkarma.conf.js
85 lines (82 loc) · 1.98 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
// Karma configuration
module.exports = function(config) {
var bsBrowserProfiles = {
'CustomChromeHeadless': {
'base': 'ChromeHeadless',
'displayName': 'Headless Chrome',
'flags': ['--disable-gpu', '--disable-translate',
'--disable-extensions','--remote-debugging-port=9223']
},
'FirefoxHeadless': {
'base': 'Firefox',
'displayName': 'Headless Firefox',
'flags': ['-headless'],
},
};
Object.assign(bsBrowserProfiles, require('./browserstack/bs-customLaunchers.json'));
config.set({
basePath: '',
// Frameworks: https://npmjs.org/browse/keyword/karma-adapter
frameworks: [
'jasmine-ajax',
'jasmine',
'jquery-3.1.1',
'fixture'
],
files: [
'node_modules/js-polyfills/keyboard.js',
'node_modules/jquery.terminal/js/jquery.terminal.js',
'spec/support/helpers.js',
'js/helpers/*.js',
'js/cmd-resume.js',
'spec/**/*.spec.js',
'fixtures/**/*.json'
],
exclude: [],
preprocessors: {
'js/**/*.js': ['coverage'],
'fixtures/**/*.json': ['json_fixtures']
},
reporters: ['progress', 'coverage', 'BrowserStack'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browserStack: {
username: process.env.BROWSERSTACK_USERNAME,
accessKey: process.env.BROWSERSTACK_KEY,
startTunnel: true,
video: false
},
customLaunchers: bsBrowserProfiles,
singleRun: true,
concurrency: Infinity,
coverageReporter: {
reporters: [
{type: 'lcovonly', subdir: '.'},
{type: 'json', subdir: '.'},
{type: 'html', subdir: '.'}
]
},
jsonFixturesPreprocessor: {
stripPrefix: 'fixtures/',
variableName: '__json__'
},
plugins: [
'karma-jasmine',
'karma-jasmine-ajax',
'karma-fixture',
'karma-json-fixtures-preprocessor',
'karma-jquery',
'karma-coverage',
'karma-browserstack-launcher',
'karma-firefox-launcher',
'karma-chrome-launcher',
'karma-browserify',
'karma-edge-launcher',
'karma-ie-launcher',
'karma-requirejs',
'karma-safari-launcher'
]
});
};