Exemplo
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
- Pacotes
- jest 29.7.0
- Ambiente
- node
- Criado
- 2026-08-17T01:54:59Z
O que costuma-se supor
Jest automatically clears mock function call history between tests by default.
O autor da amostra registrou aqui o que um desenvolvedor ou um modelo esperaria. O contrato abaixo é o que de fato rodou.
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.
Arquivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
- test/sample.test.js
Baixar o artefato verificado (tar.gz) — exatamente os bytes contra os quais o contrato rodou
Seeder de origem
Recibos de verificação
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9