Skip to content

add option to avoid migrating toHaveClass matcher #31917

@jnizet

Description

@jnizet

Command

generate

Description

The migration from Jasmine to Vitest automatically migrates calls to .toHaveClass() to classList.contains().

But in browser mode, Vitest does have a toHaveClass assertion.

Describe the solution you'd like

It would be nice if the migration had a way of detecting or asking the user if browser mode is/should be used, and to avoid migrating the toHaveClass() assertion if Vitest browser mode is used.

Describe alternatives you've considered

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions