-
-
Notifications
You must be signed in to change notification settings - Fork 2
/
karma.conf.js
67 lines (64 loc) · 1.48 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
const path = require('path');
const typescript = require('rollup-plugin-typescript');
const meta = require('./package.json');
module.exports = function (config) {
config.set({
basePath: path.resolve(__dirname),
browsers: ['ChromeHeadlessNoSandbox'],
client: {
mocha: {
reporter: 'html'
}
},
customLaunchers: {
// NOTE: https://docs.travis-ci.com/user/chrome#Sandboxing
ChromeHeadlessNoSandbox: {
base: 'ChromeHeadless',
chromeDataDir: path.resolve(__dirname, '.chrome'),
flags: ['--no-sandbox']
}
},
files: [
{
pattern: require.resolve('power-assert/build/power-assert.js'),
type: 'js',
watched: false
},
{
pattern: require.resolve('./dist/umd/ltsv.legacy.js'),
type: 'js',
watched: true
},
{
included: false,
pattern: require.resolve('./dist/umd/ltsv.legacy.js.map'),
served: true
},
{
pattern: './test/!(nodejs_stream).ts',
type: 'js',
watched: true
}
],
frameworks: ['mocha'],
preprocessors: {
'./test/*.ts': ['rollup']
},
reporters: ['dots'],
rollupPreprocessor: {
output: {
format: 'umd',
name: meta.name,
sourcemap: 'inline'
},
plugins: [
typescript({
newLine: 'lf',
strict: true,
sourceMap: true,
target: 'ES5'
})
]
}
});
};