Sample
Parameterize tests with an empty data array.
sha256:0ac6bc6acb151cfaea339a37fcb25239580e5f542c52fbd2fd83ebf290636e90
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Case
- Goal
- Parameterize tests with an empty data array. HOW
- Packages
- jest 30.4.2
- Environment
- node
- Created
- 2026-08-17T01:56:49Z
Commonly assumed
Passing an empty array to test.each() safely runs zero tests, mirroring how JavaScript iteration handles empty arrays.
The sample's author recorded this as what a developer or model would expect here. The contract below is what actually ran.
Contract
- Calling test.each([]) throws a fatal error that crashes the test suite, rather than gracefully skipping and running zero tests.
Files
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test.js
- test/contract.mjs
- trap.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-16 · ed25519:d91480838ac982c9