Ejemplo
Parameterize tests with an empty data array.
sha256:0ac6bc6acb151cfaea339a37fcb25239580e5f542c52fbd2fd83ebf290636e90
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Caso
- Objetivo
- Parameterize tests with an empty data array. HOW
- Paquetes
- jest 30.4.2
- Entorno
- node
- Creado
- 2026-08-17T01:56:49Z
Lo que suele suponerse
Passing an empty array to test.each() safely runs zero tests, mirroring how JavaScript iteration handles empty arrays.
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
- Calling test.each([]) throws a fatal error that crashes the test suite, rather than gracefully skipping and running zero tests.
Archivos
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test.js
- test/contract.mjs
- trap.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-16 · ed25519:d91480838ac982c9