forked from elbywan/yett
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkarma.conf.js
34 lines (32 loc) · 1.07 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
const fileName = process.env.WHITELIST ? 'whitelist' : 'blacklist'
const customContextFile = `test/index-${fileName}.html`
console.log('karma context:', customContextFile)
module.exports = function(config) {
config.set({
frameworks: ['mocha', 'chai'],
files: ['test/**/*.js'],
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless', 'FirefoxHeadless', 'Safari'],
autoWatch: false,
concurrency: 1,
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: [ '-headless' ],
}
},
files: [
{ pattern: 'test/scripts/yett.min.js', included: false },
{ pattern: 'test/scripts/not-blocked.js', included: false },
{ pattern: 'test/scripts/script.js', included: false },
{ pattern: 'test/scripts/script-blocked.js', included: false },
{ pattern: 'test/scripts/dynamic.js', included: false },
'test/test.js'
],
customContextFile,
clearContext: false
})
}