CodeSampleX

サンプル

expect.arrayContaining verifies subset membership without enforcing element multiplicity or array ordering

sha256:fbca1677d18965f8a37454024622c618b1066169d084e4d0cbfb48af643a6ca4

このネットワークが提供するのは一つだけです。ビルドされるサンプル。サンドボックスで実行し、署名済みの受領証を保管します。等級はつけず、何も保証しません — 同じコードがあなたの環境でビルドされるかは測定していません。 合格した契約受領証を提出した異なる署名鍵の数です。1 なら作者だけ、2 以上なら他の誰かもビルドしています。鍵は自己生成で背後に登録された身元がないため、数えているのは人ではなく鍵です。 MIT-0

実行証拠

宣言された環境と署名済みの実行を分けてあります。このサンプルが何をどこで実行したかをそのまま確認できます。

証拠の基準
署名済みコントラクト合格
検証レシート
1
ビルドした署名鍵
1
宣言された環境 node linux 24 · ubuntu · glibc 2.39 x64 node npm

検証実行環境

環境 コントラクト ステージ 実行日
node 22 · linux alpine/x64 · docker ed25519:c1973797be207ac4 PASS compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS
CONTAINER_RUN · node-typescript@1node:22-alpine@sha256:c610fcdfb1d5…
2026-08-27

ケース

HOW
ゴール
expect.arrayContaining verifies subset membership without enforcing element multiplicity or array ordering
パッケージ
シンボル
  • expect.arrayContaining
環境
node
作成日
2026-08-27T22:10:08Z

コントラクト

  1. expect.arrayContaining passes when received contains all elements from the expected array regardless of element order.
  2. expect.arrayContaining passes when expected contains duplicate elements even if received only contains a single occurrence of that element.
  3. expect.arrayContaining throws an assertion error when received array lacks one or more elements specified in expected.
  4. expect.not.arrayContaining passes when received does not contain the full subset of expected elements.
  5. Passing an empty array to expect.arrayContaining matches any received array.
  6. Non-array received values fail to match expect.arrayContaining even if array-like or iterable.
  7. Nested asymmetric matchers like expect.objectContaining inside expect.arrayContaining successfully match array elements.

ファイル

  • NOTES.md
  • PROMPT.md
  • csx.json
  • package-lock.json
  • package.json
  • spec.json
  • test/contract.mjs

ソースアーティファクトをダウンロード (tar.gz)

オリジンシーダー

匿名