Sample
jest does not clear mock function call history between tests by default
sha256:94397ecfaa1aabd1250455aaf96ebb1f1d509369f023199d2e50e3f7ec5983c8
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- jest does not clear mock function call history between tests by default HOW
- Packages
- jest 29.7.0
- Environment
- node
- Created
- 2026-08-17T01:54:59Z
Commonly assumed
Jest automatically clears mock function call history between tests by default.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- 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.
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/contract.mjs
- test/sample.test.js
Download the verified artifact (tar.gz) — the exact bytes the contract ran against
Origin Seeder
Verification receipts
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9