You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
import { esbuildPlugin } from "@web/dev-server-esbuild";
|
|
|
|
import { browserstackLauncher } from "@web/test-runner-browserstack";
|
|
|
|
import browsers from "./browserstack-browsers.js";
|
|
|
|
|
|
|
|
const ci = !!process.env.CI;
|
|
|
|
|
|
|
|
const sharedCapabilities = {
|
|
|
|
"browserstack.user": process.env.BROWSER_STACK_USERNAME,
|
|
|
|
"browserstack.key": process.env.BROWSER_STACK_ACCESS_KEY,
|
|
|
|
project: "snabbdom",
|
|
|
|
name: "CI",
|
|
|
|
build: `build ${process.env.GITHUB_RUN_NUMBER || "unknown"}`,
|
|
|
|
};
|
|
|
|
|
|
|
|
export default {
|
|
|
|
concurrentBrowsers: 2,
|
|
|
|
concurrency: ci ? 2 : undefined,
|
|
|
|
browsers: !ci
|
|
|
|
? undefined
|
|
|
|
: Object.values(browsers).map((cap) =>
|
|
|
|
browserstackLauncher({
|
|
|
|
capabilities: {
|
|
|
|
...sharedCapabilities,
|
|
|
|
...cap,
|
|
|
|
},
|
|
|
|
}),
|
|
|
|
),
|
|
|
|
files: ["src/**/*.ts", "test/unit/*.ts", "test/unit/*.tsx"],
|
|
|
|
plugins: [
|
|
|
|
esbuildPlugin({ ts: true, tsx: true, tsconfig: "./test/tsconfig.json" }),
|
|
|
|
],
|
|
|
|
};
|