Skip to content

replace deprecated Vitest spy assertion aliases #262

Description

@2yunseong

TanStack Pacer version

0.23.0 (main 9233835)

Framework/Library version

Vitest 4.1.11

Describe the bug and the steps to reproduce it

Description

Vitest 4.1 deprecated the toBe* spy assertion aliases in favor of their canonical toHaveBeen* equivalents. According to vitest-dev/vitest#9665, the deprecated aliases are planned to be removed in the next major version.

TanStack Pacer currently uses Vitest 4.1, but several tests still use these deprecated aliases:

  • toBeCalled()toHaveBeenCalled()
  • toBeCalledTimes(n)toHaveBeenCalledTimes(n)
  • toBeCalledWith(...)toHaveBeenCalledWith(...)

Proposed change

Replace all deprecated matcher aliases with their recommended equivalents while preserving the existing assertions and test behavior.

Your Minimal, Reproducible Example - (Sandbox Highly Recommended)

Reproduced directly in the test files on the current main branch.

Screenshots or Videos (Optional)

No response

Do you intend to try to help solve this bug with your own PR?

Yes, I am also opening a PR that solves the problem along side this issue

Terms & Code of Conduct

  • I agree to follow this project's Code of Conduct
  • I understand that if my bug cannot be reliable reproduced in a debuggable environment, it will probably not be fixed and this issue may even be closed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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