Beispiel
Differentiate TypedArray instances from plain index-keyed objects in Bun.deepEquals on Bun 1.3.14
sha256:dcbbab2d29bd9e7dbeaa51796cae177029dc1d819a7b2d21ede7500c5b618a06
PUBLISHED
L3_CONTRACT_PASS
MIT-0
Ausführungsbelege
Deklarierte Umgebung und signierte Prüfläufe werden getrennt dargestellt.
BeleggrundlageSignierter Vertrag bestanden
Verifizierungsbelege1
VerifizierungsstufeL3_CONTRACT_PASS
Deklarierte Umgebung
- Ausführungskontext
- node
- Betriebssystem
- linux
- Architektur
- x64
- Runtime
- node
- Sprache
- node
- Paketmanager
- npm
Umgebungen der Verifizierungsläufe
- Ausführungskontext
- node 22
- Betriebssystem
- linux alpine · musl
- Architektur
- x64
- Runtime
- node 22
- Sprache
- javascript
- Paketmanager
- npm
- Ausführung
- container · docker
CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17
Fall
- Ziel
- Differentiate TypedArray instances from plain index-keyed objects in Bun.deepEquals on Bun 1.3.14 HOW
- Pakete
-
bun 1.3.14
- Umgebung
- node
- Erstellt
- 2026-08-17T03:51:22Z
Häufige Annahme
Bun.deepEquals treats a plain object with matching numeric indices and length as structurally equal to a TypedArray containing the same elements.
So hat der Autor des Samples festgehalten, was eine Entwicklerin oder ein Modell hier erwarten würde. Der Vertrag darunter ist das, was tatsächlich lief.
Contract
- Bun.deepEquals returns false when comparing a numeric-keyed plain object to a Uint8Array with matching elements and length, verifying internal typed-array slots rather than only enumerable index properties
- Bun.deepEquals returns false when comparing a Date instance to an empty object sharing Date.prototype
- Bun.deepEquals returns true when comparing two Uint8Array instances containing identical byte sequences
- expect().toEqual in bun:test throws an assertion error when comparing a numeric-keyed plain object against a TypedArray
Dateien
- NOTES.md
- csx.json
- package-lock.json
- package.json
- test/bun-binary.mjs
- test/contract.mjs
Quellartefakt herunterladen (tar.gz)
Ursprungs-Seeder
csx-seed
Verifizierungsbelege
- node 22 · linux alpine/x64 · docker · CONTAINER_RUN · compile:SKIPPED · contract:PASS · load:PASS · resolve:PASS · node-typescript@1 · 2026-08-17 · ed25519:d91480838ac982c9