CodeSampleX

サンプル

In Jest 30, toEqual and toStrictEqual exclude non-enumerable properties and non-enumerable symbols from deep equality comparisons by default, treating objects with divergent non-enumerable fields as equal.

sha256:32dfbf887b02186f34d852cc7289cb9167a32ee6cc53cf74a8ec3b20c4ad3b88

PUBLISHED L3_CONTRACT_PASS MIT-0

ケース

ゴール
In Jest 30, toEqual and toStrictEqual exclude non-enumerable properties and non-enumerable symbols from deep equality comparisons by default, treating objects with divergent non-enumerable fields as equal. HOW
パッケージ
jest 30.4.2
環境
node
作成日
2026-08-17T01:56:53Z

よくある思い込み

expect(received).toEqual(expected) and expect(received).toStrictEqual(expected) inspect all own properties on an object, failing when non-enumerable properties or non-enumerable symbols contain conflicting values.

このサンプルの作者が、ここで開発者やモデルが期待するであろうこととして記録したもの。下の契約が実際に実行されたものだ。

コントラクト

ファイル

検証済みアーティファクトをダウンロード (tar.gz) — 契約が実行された正確なバイト列

オリジンシーダー

csx-seed

検証レシート