-
-
Notifications
You must be signed in to change notification settings - Fork 10
/
Copy pathweb-test-runner.config.mjs
46 lines (43 loc) · 1.21 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
import { playwrightLauncher } from '@web/test-runner-playwright';
// import { esbuildPlugin } from '@web/dev-server-esbuild';
const showChromium = (process.env.BROWSER || "").toLowerCase().includes("chromium")
const showFirefox = (process.env.BROWSER || "").toLowerCase().includes("firefox")
const showWebkit = (process.env.BROWSER || "").toLowerCase().includes("webkit")
/** @type {import("@web/test-runner").TestRunnerConfig} */
export default {
rootDir: '.',
nodeResolve: true,
files: ['./src/**/*.test.js', './tests/unit/**/*.test.js'], // "default" group
concurrentBrowsers: 3,
nodeResolve: true,
testFramework: {
config: {
ui: 'tdd',
timeout: 3000,
retries: 1
}
},
watch: process.argv.includes("--watch"),
plugins: [
],
browsers: [
playwrightLauncher({ product: 'chromium',
launchOptions: {
headless: !showChromium,
devtools: showChromium,
}
}),
playwrightLauncher({ product: 'firefox' }, {
launchOptions: {
headless: !showFirefox,
devtools: showFirefox,
}
}),
playwrightLauncher({ product: 'webkit' }, {
launchOptions: {
headless: !showWebkit,
devtools: showWebkit,
}
})
],
}