replace deprecated Vitest spy assertion aliases

Abierto Apto para principiantes
#262 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
74/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
typescript
Área
testing

Línea de trabajo

Busca en los archivos de prueba de la rama main actual toBeCalled(), toBeCalledTimes() y toBeCalledWith(). Reemplaza cada alias obsoleto por su equivalente canónico conservando las aserciones; después, ejecuta las pruebas relevantes o la suite de pruebas y confirma que todas las pruebas pasan y que no quedan alias obsoletos.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.
Lenguaje dominante
TypeScript
Estrellas
769
Forks
64
Merge medio
1 d 21 h
PR fusionados (30 d)
3

Guía de contribución

Abrir la guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de TanStack/pacer

Todos los issues de TanStack/pacer

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.