forked from grafana/worldmap-panel
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
90 lines (70 loc) · 2.23 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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
// Karma configuration
// Generated on Fri Apr 01 2016 17:47:29 GMT+0200 (CEST)
module.exports = (config) => {
config.set({
basePath: '',
frameworks: ['systemjs', 'mocha', 'expect'],
files: [
'node_modules/es6-shim/es6-shim.js',
'node_modules/lodash/lodash.js',
'src/worldmap.js',
'src/data_formatter.js',
'src/leaflet.js',
'test/*.js'
],
exclude: [
],
plugins: ['karma-systemjs', 'karma-babel-preprocessor', 'karma-mocha',
'karma-expect', 'karma-phantomjs-launcher'],
preprocessors: {
'src/**/*.js': ['babel'],
'test/**/*.js': ['babel']
},
// Babel preprocessor specific configuration
babelPreprocessor: {
options: {
presets: ['es2015'], // use the es2015 preset
plugins: ['transform-es2015-modules-systemjs', 'transform-es2015-for-of'],
sourceMap: 'inline' // inline source maps inside compiled files
},
// filename: function (file) {
// return file.originalPath.replace(/\.js$/, '.es5.js');
// },
sourceFileName: function (file) {
return file.originalPath;
}
},
systemjs: {
// File patterns for application code, dependencies, and test suites
files: [
'src/worldmap.js',
'src/data_formatter.js',
'src/leaflet.js',
'test/**/*.js'
],
// SystemJS configuration specifically for tests, added after your config file.
// Good for adding test libraries and mock modules
config: {
defaultJSExtensions: true,
baseURL: '.',
// Set path for third-party libraries as modules
paths: {
'babel': 'node_modules/babel-core/lib/api/browser.js',
'systemjs': 'node_modules/systemjs/dist/system.js',
'system-polyfills': 'node_modules/systemjs/dist/system-polyfills.js',
'es6-module-loader': 'node_modules/es6-module-loader/dist/es6-module-loader.js',
'lodash': 'node_modules/lodash/lodash.js',
},
transpiler: 'babel'
}
},
reporters: ['dots'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
browsers: ['PhantomJS'],
singleRun: false,
concurrency: Infinity
});
};