@wpazderski/playwright-config
v1.0.4
Published
Common Playwright configs
Readme
@wpazderski/playwright-config
Common Playwright configs
Installation and usage
Start by installing this package, for example with pnpm:
pnpm i -D @wpazderski/playwright-configThen create playwright.config.ts file, for example:
import type { PlaywrightTestConfig } from "@playwright/test";
import { get<CONFIG_NAME>PlaywrightConfig } from "@wpazderski/playwright-config/<CONFIG_NAME>.config.js";
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
export default get<CONFIG_NAME>PlaywrightConfig({
isCi: isCi,
webServerUrl: "http://localhost:3000",
testDir: "./tests",
}) as PlaywrightTestConfig;Replace <CONFIG_NAME> with chosen config (see Available configs section), for example:
import type { PlaywrightTestConfig } from "@playwright/test";
import { getBasePlaywrightConfig } from "@wpazderski/playwright-config/base.config.js";
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
export default getBasePlaywrightConfig({
isCi: isCi,
webServerUrl: "http://localhost:3000",
testDir: "./tests",
}) as PlaywrightTestConfig;Available configs
Currently only one config is provided - base.
Related projects
See https://pazderski.dev/projects/ for other projects that provide various configs, utils, tools and examples.
