forked from Esri/cedar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.dev.conf.js
52 lines (45 loc) · 1.23 KB
/
karma.dev.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
// import base configuration
var base = require('./karma.conf');
var json = require('rollup-plugin-json');
var buble =require('rollup-plugin-buble');
module.exports = function(config) {
// apply base settings
base(config);
// then override
config.set({
// list of files / patterns to load in the browser
files: [
'node_modules/d3/d3.js',
'node_modules/vega/vega.js',
'test/spec/**/*.spec.js',
{ pattern: 'src/utils/**/*.js', included: false, served: false },
{ pattern: 'src/charts/**/*.json', included: false, served: true },
'src/cedar.js',
],
preprocessors: {
'src/cedar.js': ['rollup']
},
reporters: ['mocha'],
// Configure the plugins
rollupPreprocessor: {
// rollup settings. See Rollup documentation
moduleName: 'Cedar',
// format: 'umd',
format: 'iife',
external: ['d3', 'vega'],
plugins: [json(), buble()],
globals: {
'arcgis-cedar': 'Cedar',
'd3': 'd3',
'vega': 'vg'
},
// will help to prevent conflicts between different tests entries
sourceMap: 'inline'
},
mochaReporter: {
showDiff: true
},
// re-run when files are changed
singleRun: false
});
};