-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathbrowser-react-js.karma.cjs
43 lines (41 loc) · 1.39 KB
/
browser-react-js.karma.cjs
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
const path = require('path');
const url = require('url');
const fs = require('fs');
const dir = path.resolve(__dirname, 'browser-react-js', 'build', 'static', 'js');
const js = fs.readdirSync(dir).find((x) => x.match(/main\.[a-f0-9]+.js/));
if (!js)
throw new Error(`Missing main.js bundle`);
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha'],
client: {
mocha: {
reporter: 'html',
timeout: 40000
}
},
files: [
{ pattern: path.join(__dirname, 'browser-react-js', 'build', 'static', 'js', js), included: true },
{ pattern: path.resolve(__dirname, '..', '..', 'scripts', 'wait-test.js'), included: true },
{ pattern: path.join(__dirname, 'browser-react-js', 'build', '*'), served: true, included: false },
{ pattern: path.join(__dirname, 'browser-react-js', 'build', 'static', 'js', '*'), served: true, included: false },
{ pattern: path.join(__dirname, 'browser-react-js', 'build', 'static', 'media', '*'), served: true, included: false }
],
exclude: [
],
preprocessors: {
},
proxies: {
'/static/': 'http://127.0.0.1:9876/base/browser-react-js/build/static/',
},
reporters: ['progress'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: false,
browsers: ['ChromeHeadless'],
singleRun: true,
concurrency: Infinity
});
};