playwright
playwright copied to clipboard
[BUG]: TypeScript error with using test.extend
System info
- Playwright Version: 1.41.1
- Operating System: macOS 13.5.1
- Browser: -
- Other info:
Source code
Hi! I'm trying to use test.extend in the following way:
import { test as base } from "@playwright/experimental-ct-react";
export type Options = { defaultItem: string };
// Extend basic test by providing a "defaultItem" option and a "todoPage" fixture.
export const test = base.extend<Options>({
// Define an option and provide a default value.
// We can later override it in the config.
defaultItem: ["Do stuff", { option: true }],
});
However, I'm receiving a TypeScript error:
Here's the repo: https://github.com/BlackySoul/playwright-test
Steps
- Clone the repo
- Execute the folowwing commands:
-
cd playwright-test
-
npm install
-
lint:types
-
Expected
No error present
Actual
- related #29070