-
Notifications
You must be signed in to change notification settings - Fork 14
/
Copy pathkarma.conf.js
65 lines (60 loc) · 1.52 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
var webpack = require('webpack');
module.exports = config => {
config.set({
basePath: '',
frameworks: ['tap', 'webpack'],
files: [
{pattern: 'test/integration/index.js'},
{
pattern: 'test/assets/sprite_sheets/**/*.*',
watched: false,
included: false,
served: true,
},
],
preprocessors: {
'test/integration/*.js': ['webpack', 'sourcemap'],
},
webpack: {
mode: 'development',
module: {
rules: [
{
enforce: 'post',
test: /\.js$/,
exclude: [
/(test|node_modules)\//,
/.*src\/p5.dance.interpreted.js/,
],
loader: 'coverage-istanbul-loader',
},
],
},
resolve: {
fallback: {
path: require.resolve('path-browserify'),
stream: require.resolve('stream-browserify'),
fs: false,
},
extensions: ['.jsx', '.js', '.tsx', '.ts'],
},
plugins: [
new webpack.ProvidePlugin({
process: 'process/browser',
}),
],
},
reporters: ['tap-pretty', 'coverage'],
// Run headless unless WATCH=1.
browsers: [process.env['WATCH'] ? 'Chrome' : 'ChromeHeadless'],
// Run and exit unless WATCH=1.
singleRun: !process.env['WATCH'],
// 30 seconds.
browserNoActivityTimeout: 30 * 1000,
// Code coverage.
coverageReporter: {
dir: 'coverage/integration',
reporters: [{type: 'lcovonly'}],
},
});
};