forked from tlaukkan/code-reality
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.config.js
36 lines (35 loc) · 1.17 KB
/
karma.config.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
const webpackConfig = require("./webpack.config");
module.exports = function (config) {
config.set({
frameworks: ['mocha','chai'],
files: [
{ pattern: 'https://cdn.jsdelivr.net/gh/aframevr/aframe@cb4de2e19d577e9b5c34f01efe1c1d96c1d1c2e0/dist/aframe-master.min.js', watched: false},
{ pattern: 'test/browser/**/*.ts', watched: true },
{ pattern: 'test/common/**/*.ts', watched: true }
],
preprocessors: {
'test/browser/**/*.ts': [ 'webpack' ],
'test/common/**/*.ts': [ 'webpack' ]
},
webpack: {
module: webpackConfig.module,
resolve: webpackConfig.resolve,
externals: webpackConfig.externals
},
webpackMiddleware: {
stats: 'errors-only'
},
port: 9876, // karma web server port
colors: true,
logLevel: config.LOG_INFO,
browsers: ['ChromeHeadless', 'FirefoxHeadless'],
autoWatch: true,
singleRun: false,
customLaunchers: {
FirefoxHeadless: {
base: 'Firefox',
flags: ['-headless'],
},
},
})
}