Files
exploRUGComponent/web-test-runner.config.js
Kevin Schaaf fddb01149c Update lit-starter-ts to lit-next
* Upgrades the source to work with lit-next
* Aligns the linting and formatting rules/settings & ignores with the monorepo
* Upgrades to the same version of typescript and tsconfig settings as the monorepo
* Upgrades the test runner from karma to web-test-runner
* Upgrades the dev server from es-dev-server to @web/dev-server
2021-01-29 17:35:17 -08:00

40 lines
1.0 KiB
JavaScript

import {playwrightLauncher} from '@web/test-runner-playwright';
import {legacyPlugin} from '@web/dev-server-legacy';
let commandLineBrowsers;
try {
commandLineBrowsers = process.env.BROWSERS?.split(',').map((b) =>
playwrightLauncher({product: b})
);
} catch {
console.warn(`BROWSER ${process.env.BROWSERS} unknown; using defaults`);
}
// https://modern-web.dev/docs/test-runner/cli-and-configuration/
export default {
rootDir: '.',
files: ['./test/**/*_test.js'],
nodeResolve: true,
preserveSymlinks: true,
browsers: commandLineBrowsers ?? [
playwrightLauncher({product: 'chromium'}),
playwrightLauncher({product: 'firefox'}),
playwrightLauncher({product: 'webkit'}),
],
testFramework: {
// https://mochajs.org/api/mocha
config: {
ui: 'tdd',
},
},
plugins: [
// Detect browsers without modules (e.g. IE11) and transform to SystemJS
// (https://modern-web.dev/docs/dev-server/plugins/legacy/).
legacyPlugin({
polyfills: {
webcomponents: true,
},
}),
],
};