-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathweb-test-runner.config.js
More file actions
44 lines (42 loc) · 1006 Bytes
/
web-test-runner.config.js
File metadata and controls
44 lines (42 loc) · 1006 Bytes
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
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { playwrightLauncher } from '@web/test-runner-playwright';
import { URL, fileURLToPath } from 'url';
export const baseConfig = {
files: ['src/**/*.spec.ts', '!src/ssr/**/*.spec.ts'],
plugins: [
esbuildPlugin({
ts: true,
tsconfig: fileURLToPath(
new URL('./tsconfig.json', import.meta.url),
),
target: 'auto',
define: {
'__ENV__': JSON.stringify('development'),
'__SSR__': JSON.stringify(false),
},
}),
],
browsers: [
playwrightLauncher(),
],
nodeResolve: {
exportConditions: ['production'],
},
coverage: true,
coverageConfig: {
include: ['src/**/*.ts'],
exclude: [
'**/node_modules/**/*',
'**/test/**/*',
'**/*.d.ts',
],
threshold: { statements: 0, functions: 0, branches: 0, lines: 0 },
},
playwright: true,
testFramework: {
config: {
timeout: '10000',
},
},
};
export default baseConfig;