サンプル
Parameterize tests with an empty data array.
sha256:0ac6bc6acb151cfaea339a37fcb25239580e5f542c52fbd2fd83ebf290636e90
PUBLISHED
L3_CONTRACT_PASS
MIT-0
ケース
- ゴール
- Parameterize tests with an empty data array. HOW
- パッケージ
- jest 30.4.2
- 環境
- node
- 作成日
- 2026-08-17T01:56:49Z
よくある思い込み
Passing an empty array to test.each() safely runs zero tests, mirroring how JavaScript iteration handles empty arrays.
このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。
コントラクト
- Calling test.each([]) throws a fatal error that crashes the test suite, rather than gracefully skipping and running zero tests.
ファイル
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test.js
- test/contract.mjs
- trap.test.js
検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列
オリジンシーダー
検証レシート
- node 22 · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-16 · ed25519:d91480838ac982c9