-
Notifications
You must be signed in to change notification settings - Fork 43
/
Copy pathkarma.conf.js
45 lines (45 loc) · 1.39 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
// karma.conf.js
module.exports = (config) => {
config.set({
// this will keep the test output open on the karma browser result site
client: {
clearContext: false
},
basePath: "./",
frameworks: ["jasmine", "esm"],
files: [
"./node_modules/leaflet/dist/leaflet-src.js",
"./node_modules/leaflet/dist/leaflet.css",
{ pattern: "./src/L.Control.Heightgraph.js", type: 'module' },
"./src/L.Control.Heightgraph.css",
{ pattern: 'spec/**/*.Spec.js', type: 'module' }
],
plugins: [
// load plugin
require.resolve('@open-wc/karma-esm'),
// fallback: resolve any karma- plugins
'karma-*',
],
browsers: ["Chrome"],
autoWatch: true,
reporters: [
"progress",
"kjhtml",
"coverage"
],
// TODO: coverage reports currently not working
coverageReporter: {
dir: "coverage/",
reporters: [
{type: "html", subdir: "html"},
{type: "lcovonly", subdir: "../coverage"},
{type: "json", subdir: "../coverage"},
{type: "text-summary"}
],
},
esm: {
nodeResolve: true
},
logLevel: config.LOG_DEBUG, failOnEmptyTestSuite: true
})
}