-
Notifications
You must be signed in to change notification settings - Fork 3
/
karma.conf.js
89 lines (85 loc) · 2.26 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
/* eslint-disable import/no-extraneous-dependencies */
const { createDefaultConfig } = require('@open-wc/testing-karma');
const merge = require('deepmerge');
module.exports = (config) => {
config.set(
merge(createDefaultConfig(config), {
files: [
// runs all files ending with .test in the test folder,
// can be overwritten by passing a --grep flag. examples:
//
// npm run test -- --grep test/foo/bar.test.js
// npm run test -- --grep test/bar/*
{
pattern: config.grep ? config.grep : 'test/**/*.test.js',
type: 'module'
},
{
pattern: 'node_modules/cryptojslib/rollups/md5.js',
type: 'js'
},
{
pattern: 'node_modules/jsonlint/lib/jsonlint.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/lib/codemirror.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/addon/mode/loadmode.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/mode/meta.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/mode/javascript/javascript.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/mode/xml/xml.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/mode/htmlmixed/htmlmixed.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/mode/markdown/markdown.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/addon/lint/lint.js',
type: 'js'
},
{
pattern: 'node_modules/codemirror/addon/lint/json-lint.js',
type: 'js'
}
],
// see the karma-esm docs for all options
esm: {
// if you are using 'bare module imports' you will need this option
nodeResolve: true
},
client: {
mocha: {
timeout: 5000
}
},
coverageIstanbulReporter: {
thresholds: {
global: {
statements: 75,
branches: 65,
functions: 85,
lines: 75
}
}
},
})
);
return config;
};