forked from i18next/i18next
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
64 lines (52 loc) · 1.49 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
//const istanbul = require( 'browserify-istanbul' );
module.exports = function (karma) {
// Ensure consistent conversion of timestamps to date strings (has no effect
// on Windows)
process.env.TZ = 'UTC';
karma.set({
frameworks: ['mocha', 'chai', 'sinon', 'browserify'],
files: [
//'vendor/external.js',
'test/**/*.spec.js',
{ pattern: 'test/locales/**/*.json', watched: true, included: false, served: true },
],
proxies: {
'/locales': 'http://localhost:9876/base/test/locales',
},
reporters: ['coverage', 'coveralls', 'spec'],
preprocessors: {
'test/**/*.spec.js': ['browserify'],
'src/**/*.js': ['browserify', 'coverage'],
},
browsers: ['HeadlessChrome'],
customLaunchers: {
HeadlessChrome: {
base: 'ChromeHeadless',
flags: ['—no-sandbox'],
},
},
port: 9876,
//logLevel: 'LOG_DEBUG',
//singleRun: true,
//autoWatch: false,
//
// client: {
// mocha: {
// reporter: 'spec', // change Karma's debug.html to the mocha web reporter
// ui: 'tdd'
// }
// },
// browserify configuration
browserify: {
debug: true,
transform: [
['babelify', { presets: ['@babel/preset-env'] }],
/*'brfs',*/ 'browserify-istanbul',
],
},
coverageReporter: {
type: 'lcov', //'html', // disabled - erroring now, https://github.com/karma-runner/karma-coverage/issues/157
dir: 'coverage/',
},
});
};