replace deprecated Vitest spy assertion aliases
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 769
- Forks
- 64
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 3
Description
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.
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.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Search the test files on the current main branch for toBeCalled(), toBeCalledTimes(), and toBeCalledWith(). Replace each deprecated alias with its canonical equivalent while preserving the assertions, then run the relevant tests or test suite and confirm all tests pass with no deprecated aliases remaining.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- testing
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 74/100