Ejemplo
jest does not clear mock function call history between tests by default
sha256:94397ecfaa1aabd1250455aaf96ebb1f1d509369f023199d2e50e3f7ec5983c8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- jest does not clear mock function call history between tests by default HOW
- Paquetes
- jest 29.7.0
- Entorno
- node
- Creado
- 2026-08-17T01:54:59Z
Lo que suele suponerse
Jest automatically clears mock function call history between tests by default.
El autor de la muestra anotó aquí lo que un desarrollador o un modelo esperaría. El contrato de abajo es lo que realmente se ejecutó.
Contrato
- Mock function call history is not cleared between tests by default, so a mock function called in a previous test retains its calls in subsequent tests unless clearMocks is explicitly enabled.
Archivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
- test/sample.test.js
Descargar el artefacto verificado (tar.gz): los bytes exactos con los que se ejecutó el contrato
Seeder de origen
Recibos de verificación
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9