-
Notifications
You must be signed in to change notification settings - Fork 0
/
karma.conf.js
52 lines (47 loc) · 1.4 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
const babel = require('@rollup/plugin-babel').default;
const resolve = require('@rollup/plugin-node-resolve').default;
const commonjs = require('@rollup/plugin-commonjs');
module.exports = function (config) {
config.set({
basePath: '',
frameworks: ['mocha'],
files: [
// TODO: figure out how to test files that import from @arcgis/core
// {
// pattern: 'test/**/*.js'
// },
'test/fontsTest.js',
'test/notes.css'
],
preprocessors: {
'test/**/*.js' : ['rollup']
},
rollupPreprocessor: {
output: {
format: 'umd',
name: 'HubNotesLayerTestSuite'
},
// treeshake: false, // treeshaking can remove test code we need!
plugins: [
resolve(),
commonjs(),
babel({
exclude: ['node_modules/**'],
plugins: ['@babel/plugin-proposal-class-properties']
})
]
},
plugins: [
'karma-rollup-preprocessor',
'karma-mocha',
'karma-chrome-launcher',
'karma-mocha-reporter'
],
reporters: ['mocha'],
port: 9876,
logLevel: config.LOG_INFO,
browsers: ['Chrome'],
autoWatch: false,
singleRun: true
});
};