Skip to content

support for asymmetricMatch as the value for toHaveAttribute matcher #91

Closed
@revathskumar

Description

@revathskumar

Describe the feature you'd like:

Adding support for asymmetricMatchers like expec.stringContaining as the value to toHaveAttribute matcher
Eg:

      expect(getByLabelText(/Download Template/)).toHaveAttribute(
        "href",
        expect.stringContaining("?type=instruments")
      );

Suggested implementation:

Describe alternatives you've considered:

As of now this is achived by

      expect(getByLabelText(/Download Template/).getAttribute("href")).toEqual(
        expect.stringContaining("type=instruments")
      );

Teachability, Documentation, Adoption, Migration Strategy:

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions