-
Notifications
You must be signed in to change notification settings - Fork 824
/
web-test-runner.config.mjs
42 lines (41 loc) · 1.12 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
// import {esbuildPlugin} from '@web/dev-server-esbuild';
import {devices, playwrightLauncher} from '@web/test-runner-playwright';
export default {
concurrency: 10,
nodeResolve: true,
files: 'lib/**/*_test.js',
// in a monorepo you need to set set the root dir to resolve modules
rootDir: '../../',
browserLogs: false,
filterBrowserLogs:
(log) => {
return log.type === 'error';
},
testRunnerHtml: testFramework => `
<html>
<head>
<meta name="viewport" content="width=device-width, initial-scale=1" />
</head>
<body>
<script>window.process = { env: { NODE_ENV: "development" } }</script>
<script type="module" src="${testFramework}"></script>
</body>
</html>`,
testsFinishTimeout: 300000,
testFramework: {
config: {
ui: 'tdd',
timeout: '120000',
},
},
// plugins: [esbuildPlugin({ts: true})],
// browsers:
// [
// playwrightLauncher({
// product: 'webkit',
// createBrowserContext({browser}) {
// return browser.newContext({...devices['iPhone X']});
// },
// }),
// ],
};