31 lines
870 B
JavaScript
31 lines
870 B
JavaScript
import { esbuildPlugin } from '@web/dev-server-esbuild';
|
|
import { playwrightLauncher } from '@web/test-runner-playwright';
|
|
|
|
export default {
|
|
nodeResolve: true,
|
|
files: 'src/**/*.test.ts',
|
|
plugins: [esbuildPlugin({ ts: true, target: 'auto' })],
|
|
browsers: [
|
|
playwrightLauncher({ product: 'chromium' }),
|
|
playwrightLauncher({ product: 'firefox' }),
|
|
playwrightLauncher({ product: 'webkit' }),
|
|
],
|
|
coverageConfig: {
|
|
reporters: ['lcovonly', 'text-summary'],
|
|
},
|
|
testRunnerHtml: (testFramework) =>
|
|
`<html>
|
|
<head>
|
|
<link rel="stylesheet" href="/src/css/custom-properties.css">
|
|
</head>
|
|
<body>
|
|
<script type="module" src="${testFramework}"></script>
|
|
<script type="module">
|
|
import 'element-internals-polyfill';
|
|
import '@umbraco-ui/uui';
|
|
import 'router-slot';
|
|
</script>
|
|
</body>
|
|
</html>`,
|
|
};
|