-
Notifications
You must be signed in to change notification settings - Fork 1
/
web-test-runner.config.mjs
39 lines (37 loc) · 1.11 KB
/
web-test-runner.config.mjs
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
import rollupAlias from '@rollup/plugin-alias'
import rollupReplace from '@rollup/plugin-replace'
import {esbuildPlugin} from '@web/dev-server-esbuild'
import {fromRollup} from '@web/dev-server-rollup'
import rollupCss from 'rollup-plugin-import-css'
const alias = fromRollup(rollupAlias)
const replace = fromRollup(rollupReplace)
const css = fromRollup(rollupCss)
/** @type {import('@web/test-runner').TestRunnerConfig} */
export default {
coverageConfig: {
report: true,
reportDir: 'coverage/e2e',
reporters: ['cobertura', 'lcovonly', 'text'],
include: ['src/**/*.ts']
},
mimeTypes: {
'**/antd.min.css': 'js'
},
plugins: [
alias({
entries: {
'chai-as-promised': '@esm-bundle/chai-as-promised',
react: '@esm-bundle/react',
'react-dom': '@esm-bundle/react-dom',
'react-is': '@esm-bundle/react-is',
classnames: '@esm-bundle/classnames',
lodash: 'lodash-es'
}
}),
css(),
esbuildPlugin({ts: true, target: 'ES2020'}),
replace({
'process.env.NODE_ENV': JSON.stringify('production')
}, {preventAssignment: true})
]
}