Skip to content
Source
Sign inSign up
TanStack/pacer

replace deprecated Vitest spy assertion aliases #262

Open2yunseong(GitHub profile, opens in a new tab) opened this issue 0 comments

TanStack Pacer version

0.23.0 (main 9233835f)

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.

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.

Sign in to join this conversation.