Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: TypeScript error with using test.extend #29098

Closed
BlackySoul opened this issue Jan 22, 2024 · 1 comment
Closed

[BUG]: TypeScript error with using test.extend #29098

BlackySoul opened this issue Jan 22, 2024 · 1 comment
Assignees
Labels

Comments

@BlackySoul
Copy link

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:

image

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

image
@pavelfeldman
Copy link
Member

Folding into #27509

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants