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.
snabbdom/web-test-runner.config.js

34 lines
952 B
JavaScript

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,
browserStartTimeout: 90000, // 90 seconds
concurrency: ci ? 2 : 1,
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" })
]
};