-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathweb-test-runner.config.mjs
More file actions
38 lines (32 loc) · 1.01 KB
/
web-test-runner.config.mjs
File metadata and controls
38 lines (32 loc) · 1.01 KB
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
33
34
35
36
37
38
// eslint-disable-next-line foo
import { env } from "node:process";
import { esbuildPlugin } from "@web/dev-server-esbuild";
import { playwrightLauncher } from "@web/test-runner-playwright";
import { junitReporter } from "@web/test-runner-junit-reporter";
import { verboseReporter } from "./verbose-test-reporter.js";
const browsers = [playwrightLauncher({ product: "chromium" })];
const config = {
nodeResolve: true,
files: ["tests/**/*.ts", "tests/**/*.js"],
plugins: [esbuildPlugin({ ts: true, target: "esnext" })],
browsers,
reporters: [verboseReporter()],
filterBrowserLogs(log) {
if (
typeof log.args[0] === "string" &&
log.args[0].includes(
"Lit is in dev mode. Not recommended for production! See https://lit.dev/msg/dev-mode for more information.",
)
) {
return false;
}
return true;
},
};
if (env.CI) {
config.browsers.push(
//playwrightLauncher({ product: "firefox" }),
playwrightLauncher({ product: "webkit" }),
);
}
export default config;