Scope
Port the unchanged upstream js/bun/test/mock-fn.test.js and js/bun/test/spyMatchers.test.ts suites to the Home bootstrap runner without TODO rewriting.
This tranche covers:
- Jest-compatible mock function prototype, metadata, state replacement, call contexts, instances, invocation ordering, one-shot implementations, and
withImplementationrestoration - non-function
jest.fn(value)return-value shorthand - idempotent function/data-property spying, descriptor restoration, and indexed property keys
- incomplete recursive result tracking and return/call matcher semantics
- positive and negated
objectContainingsupport in nested matcher equality - permanent exact-count corpus regressions
Validation
mock-fn.test.js: 54 passed, 0 failed, 0 unsupported, 0 todospyMatchers.test.ts: 145 passed, 0 failed, 0 unsupported, 5 upstream-declared todo- neighboring mock/expect matrix: 37 passed, 0 failed, 0 unsupported, 0 todo
- both activated fixtures are byte-identical to
~/Code/bun - full
./pantry/.bin/zig build test -Dfilter=home_test --summary failuresgate passes
Tracked under #66.