ReviewOS

zig-utils/zig-js

ABI: implement exact Jest deep matching

#231
Closed chris opened this 9 days ago ·
9 days ago

Parent: #229 Depends on: core structural engine in #230

Goal

Implement the pinned Bun/Jest comparison layer plus:

  • JSC__JSValue__jestDeepEquals
  • JSC__JSValue__jestStrictDeepEquals
  • JSC__JSValue__jestDeepMatch

Acceptance

  • Reuse the exact #230 structural engine without changing non-Jest behavior.
  • Dispatch asymmetric matchers in either equality operand with exact flags, negation, promise-mode, callability, and exception behavior.
  • Cover any/anything/string/number/object/array-containing, close-to, and custom asymmetric matcher semantics supported by the pinned profile.
  • Implement recursive subset matching, nested object-containing exhaustiveness, cycles, inherited/existing properties, Symbols, and optional matched-property replacement.
  • Preserve getters/proxies, same-VM sibling identity, foreign rejection, OOM cleanup, and first-wins pending exceptions.
  • Focused matrices, fixture/inventory wiring, batched audits, README/docs evidence, small commits on origin/main.
9 days ago

Implemented and published on origin/main.

Evidence:

  • code: 06864e96 (feat(abi): implement exact Jest deep matching (#231))
  • documentation: 8fc2f925 (docs(abi): publish Jest matching evidence (#231))
  • focused Jest matrix: 3/3 passed, 0 skipped, 0 failed, 0 leaked
  • Home fixture: 219/219 symbols linked; runtime matrix passed
  • Home profile: 220/431 implemented, 211 pending
  • Bun core: 214/421 implemented, 207 pending
  • public audit: 117/117 public, 19 extensions, 224 private/support exports

The committed matrix covers right-first matcher dispatch, anything/any and builtin constructors, string containing/matching, array/object containing, close-to and infinities, negation, settled resolve/reject modes, custom standard-marker hooks, matcher exceptions/callability, recursive subsets, inherited properties, Symbols, exact arrays, cycles, nested object-containing exhaustiveness, direct replacement in both orientations including accessors, proxy observability, sibling realms, foreign rejection, and first-wins pending exceptions. Non-Jest equality remains matcher-hook-free. The benchmark artifact remains 36a617b3 because this is an ABI-only slice.

Sign in to comment on this issue.