Skip to content

[Feature] Add global setting to make getByText default to exact: true #19235

Description

@jpveooys

The default behaviour in Testing Library is { exact: true }, while Playwright defaults to { exact: false }.

Naturally this is bound to catch people out. It would be useful to have at least a global setting to change the default to { exact: true }.

See also https://github.com/microsoft/playwright/discussions/18239

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions