-
-
Notifications
You must be signed in to change notification settings - Fork 14
/
karma.conf.js
40 lines (38 loc) · 1.29 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
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: 'i18n/**/*', watched: false, included: false, served: true },
{ pattern: 'demo/*.json', watched: false, included: false, served: true }
],
proxies: {
'/demo': '/base/demo',
'/demo/i18n': '/base/demo/i18n',
'/i18n': '/base/i18n'
},
// see the karma-esm docs for all options
esm: {
// if you are using 'bare module imports' you will need this option
nodeResolve: true
},
concurrency: 1,
client: {
endpoint: config.endpoint ? config.endpoint : 'http://localhost:8080/exist/apps/tei-publisher',
passwd: config.passwd ? config.passwd : 'simple',
mocha: {
timeout: 10000
}
},
hostname: '127.0.0.1'
})
);
return config;
};