-
Notifications
You must be signed in to change notification settings - Fork 2
/
web-test-runner.config.mjs
32 lines (31 loc) · 1.13 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
import { playwrightLauncher } from '@web/test-runner-playwright';
import { esbuildPlugin } from '@web/dev-server-esbuild';
import { defaultReporter } from '@web/test-runner';
import { bundlePerformancePlugin, renderPerformancePlugin, performanceReporter } from './dist/lib/index.js';
export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({
concurrency: 1,
concurrentBrowsers: 1,
nodeResolve: true,
testsFinishTimeout: 60000,
testFramework: {
config: {
ui: 'bdd',
timeout: '60000',
},
},
files: ['./src/*.performance.ts'],
browsers: [playwrightLauncher({ product: 'chromium', launchOptions: { headless: !!process.env.GITHUB_ACTION } })],
plugins: [
esbuildPlugin({ ts: true, json: true, target: 'auto', sourceMap: true }),
renderPerformancePlugin(),
bundlePerformancePlugin({
// optimize: false,
// writePath: `./dist/performance`,
aliases: [{ find: /^demo-module$/, replacement: `./demo-module` }]
}),
],
reporters: [
defaultReporter({ reportTestResults: true, reportTestProgress: true }),
performanceReporter({ writePath: `./dist/performance` })
]
});