|
| 1 | +// import { playwrightLauncher } from '@web/test-runner-playwright'; |
| 2 | + |
| 3 | +const filteredLogs = ['Running in dev mode', 'lit-html is in dev mode']; |
| 4 | + |
| 5 | +export default /** @type {import("@web/test-runner").TestRunnerConfig} */ ({ |
| 6 | + /** Test files to run */ |
| 7 | + files: 'test/**/*.test.js', |
| 8 | + |
| 9 | + /** Resolve bare module imports */ |
| 10 | + nodeResolve: { |
| 11 | + exportConditions: ['browser', 'development'], |
| 12 | + }, |
| 13 | + |
| 14 | + /** Filter out lit dev mode logs */ |
| 15 | + filterBrowserLogs(log) { |
| 16 | + for (const arg of log.args) { |
| 17 | + if (typeof arg === 'string' && filteredLogs.some(l => arg.includes(l))) { |
| 18 | + return false; |
| 19 | + } |
| 20 | + } |
| 21 | + return true; |
| 22 | + }, |
| 23 | + |
| 24 | + /** Compile JS for older browsers. Requires @web/dev-server-esbuild plugin */ |
| 25 | + // esbuildTarget: 'auto', |
| 26 | + |
| 27 | + /** Amount of browsers to run concurrently */ |
| 28 | + // concurrentBrowsers: 2, |
| 29 | + |
| 30 | + /** Amount of test files per browser to test concurrently */ |
| 31 | + // concurrency: 1, |
| 32 | + |
| 33 | + /** Browsers to run tests on */ |
| 34 | + // browsers: [ |
| 35 | + // playwrightLauncher({ product: 'chromium' }), |
| 36 | + // playwrightLauncher({ product: 'firefox' }), |
| 37 | + // playwrightLauncher({ product: 'webkit' }), |
| 38 | + // ], |
| 39 | + |
| 40 | + // See documentation for all available options |
| 41 | +}); |
0 commit comments