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
This commit is contained in:
39
web-test-runner.config.js
Normal file
39
web-test-runner.config.js
Normal file
@@ -0,0 +1,39 @@
|
||||
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,
|
||||
},
|
||||
}),
|
||||
],
|
||||
};
|
||||
Reference in New Issue
Block a user