forked from ing-bank/lion
-
Notifications
You must be signed in to change notification settings - Fork 0
/
web-test-runner.config.mjs
48 lines (46 loc) · 1.07 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
40
41
42
43
44
45
46
47
48
import fs from 'fs';
import { playwrightLauncher } from '@web/test-runner-playwright';
const packages = fs
.readdirSync('packages')
.filter(
dir => fs.statSync(`packages/${dir}`).isDirectory() && fs.existsSync(`packages/${dir}/test`),
)
.concat(
fs
.readdirSync('packages/helpers')
.filter(
dir =>
fs.statSync(`packages/helpers/${dir}`).isDirectory() &&
fs.existsSync(`packages/helpers/${dir}/test`),
)
.map(dir => `helpers/${dir}`),
);
export default {
nodeResolve: true,
coverageConfig: {
report: true,
reportDir: 'coverage',
threshold: {
statements: 90,
branches: 65,
functions: 80,
lines: 90,
},
},
testFramework: {
config: {
timeout: '3000',
},
},
browsers: [
playwrightLauncher({ product: 'firefox', concurrency: 1 }),
playwrightLauncher({ product: 'chromium' }),
playwrightLauncher({ product: 'webkit' }),
],
groups: packages.map(pkg => {
return {
name: pkg,
files: `packages/${pkg}/test/**/*.test.js`,
};
}),
};