Loading the parity record
Fetching the measured run — the pinned upstream oracle, every symbol and every case.
Fetching the measured run — the pinned upstream oracle, every symbol and every case.
Parity / Jest
Every number on this page was produced by running both implementations over the same cases: the real expect package pinned at 29.7.0 answers first, and its answer is the expectation the Go port is held to. Nothing is a hand-written expectation, so a new upstream release re-scores the port on its own. See Jest for the port's own documentation. Source: github.com/malcolmston/jest.
Not a generic diagram: every node below names an artefact of this harness — the pinned package it installed, the runner files it started, the case files it streamed, and the counts it wrote out.
| Case group | Cases | Match | Mismatch | Group parity |
|---|---|---|---|---|
| equality | 66 | 47 | 14 | 71.2% |
| asymmetric | 61 | 55 | 3 | 90.2% |
| collections | 54 | 46 | 7 | 85.2% |
| mocks | 45 | 41 | 1 | 91.1% |
| truthiness | 44 | 41 | 0 | 93.2% |
| numbers | 37 | 35 | 1 | 94.6% |
| errors | 25 | 17 | 0 | 68.0% |
| strings | 21 | 17 | 3 | 81.0% |
| instanceof | 16 | 12 | 2 | 75.0% |
Every exported symbol of the upstream package, and what the port offers for it. The upstream list is derived mechanically, never from a README: cd parity/jest/node && node enum.cjs. A symbol with no case is untested, never a match.
| Upstream symbol | Go symbol | Status | Cases | Note |
|---|---|---|---|---|
| expect().lastCalledWith | jest.Matcher.LastCalledWith | match | 1 (1 compared) | |
| expect().lastReturnedWith | — | missing | — | no such alias; ToHaveLastReturnedWith exists — case lastreturnedwith-alias-missing |
| expect().not | jest.Matcher.Not | match | — | 25 negated cases spread across every group |
| expect().nthCalledWith | jest.Matcher.NthCalledWith | match | 1 (1 compared) | |
| expect().nthReturnedWith | — | missing | — | no such alias; ToHaveNthReturnedWith exists — case nthreturnedwith-alias-missing |
| expect().rejects | — | missing | — | no promise modifier in the port |
| expect().resolves | — | missing | — | no promise modifier in the port |
| expect().toBe | jest.Matcher.ToBe | differs | 18 (17 compared) | disagrees on: tobe-arr-structural, tobe-nan-vs-nan, tobe-obj-structural, tobe-zero-vs-negzero; 1 deviation case(s) |
| expect().toBeCalled | jest.Matcher.ToBeCalled | match | 1 (1 compared) | |
| expect().toBeCalledTimes | jest.Matcher.ToBeCalledTimes | match | 1 (1 compared) | |
| expect().toBeCalledWith | jest.Matcher.ToBeCalledWith | match | 1 (1 compared) | |
| expect().toBeCloseTo | jest.Matcher.ToBeCloseTo | differs | 13 (12 compared) | disagrees on: closeto-inf-both; 1 deviation case(s) |
| expect().toBeDefined | jest.Matcher.ToBeDefined | match | 6 (5 compared) | 1 deviation case(s) |
| expect().toBeFalsy | jest.Matcher.ToBeFalsy | match | 10 (10 compared) | |
| expect().toBeGreaterThan | jest.Matcher.ToBeGreaterThan | match | 10 (10 compared) | |
| expect().toBeGreaterThanOrEqual | jest.Matcher.ToBeGreaterThanOrEqual | match | 4 (4 compared) | |
| expect().toBeInstanceOf | jest.Matcher.ToBeInstanceOf | differs | 16 (14 compared) | disagrees on: instanceof-primitive-number, instanceof-primitive-string; 2 deviation case(s) |
| expect().toBeLessThan | jest.Matcher.ToBeLessThan | match | 6 (6 compared) | |
| expect().toBeLessThanOrEqual | jest.Matcher.ToBeLessThanOrEqual | match | 4 (4 compared) | |
| expect().toBeNaN | jest.Matcher.ToBeNaN | match | 4 (4 compared) | |
| expect().toBeNull | jest.Matcher.ToBeNull | match | 6 (5 compared) | 1 deviation case(s) |
| expect().toBeTruthy | jest.Matcher.ToBeTruthy | match | 14 (14 compared) | |
| expect().toBeUndefined | jest.Matcher.ToBeUndefined | match | 4 (3 compared) | 1 deviation case(s) |
| expect().toContain | jest.Matcher.ToContain | differs | 16 (15 compared) | disagrees on: contain-arr-reference; 1 deviation case(s) |
| expect().toContainEqual | jest.Matcher.ToContainEqual | differs | 8 (8 compared) | disagrees on: containequal-nan, containequal-undefined-prop |
| expect().toEqual | jest.Matcher.ToEqual | differs | 34 (32 compared) | disagrees on: toequal-absent-prop-vs-undefined, toequal-cyclic-diff, toequal-cyclic-same, toequal-nan-in-array, toequal-nan-vs-nan, toequal-undefined-prop-ignored, toequal-zero-vs-negzero; 2 deviation case(s) |
| expect().toHaveBeenCalled | jest.Matcher.ToHaveBeenCalled | match | 4 (4 compared) | |
| expect().toHaveBeenCalledTimes | jest.Matcher.ToHaveBeenCalledTimes | match | 3 (3 compared) | |
| expect().toHaveBeenCalledWith | jest.Matcher.ToHaveBeenCalledWith | match | 8 (8 compared) | |
| expect().toHaveBeenLastCalledWith | jest.Matcher.ToHaveBeenLastCalledWith | match | 3 (3 compared) | |
| expect().toHaveBeenNthCalledWith | jest.Matcher.ToHaveBeenNthCalledWith | match | 4 (4 compared) | |
| expect().toHaveLastReturnedWith | jest.Matcher.ToHaveLastReturnedWith | match | 2 (2 compared) | |
| expect().toHaveLength | jest.Matcher.ToHaveLength | differs | 11 (11 compared) | disagrees on: havelength-map, havelength-obj, havelength-str-astral, havelength-str-unicode |
| expect().toHaveNthReturnedWith | jest.Matcher.ToHaveNthReturnedWith | match | 2 (2 compared) | |
| expect().toHaveProperty | jest.Matcher.ToHaveProperty | match | 14 (14 compared) | |
| expect().toHaveReturned | jest.Matcher.ToHaveReturned | match | 3 (3 compared) | |
| expect().toHaveReturnedTimes | jest.Matcher.ToHaveReturnedTimes | match | 2 (2 compared) | |
| expect().toHaveReturnedWith | jest.Matcher.ToHaveReturnedWith | differs | 4 (4 compared) | disagrees on: returnedwith-undefined |
| expect().toMatch | jest.Matcher.ToMatch | differs | 15 (14 compared) | disagrees on: match-non-string-actual, match-string-invalid-regexp, match-string-metachars-only-regexp-would-match; 1 deviation case(s) |
| expect().toMatchObject | jest.Matcher.ToMatchObject | match | 11 (11 compared) | |
| expect().toReturn | jest.Matcher.ToReturn | match | 1 (1 compared) | |
| expect().toReturnTimes | — | missing | — | no such alias; ToHaveReturnedTimes exists — case returntimes-alias-missing |
| expect().toReturnWith | jest.Matcher.ToReturnWith | match | 1 (1 compared) | |
| expect().toStrictEqual | jest.Matcher.ToStrictEqual | differs | 14 (12 compared) | disagrees on: tostrict-cyclic-same, tostrict-nan-vs-nan, tostrict-zero-vs-negzero; 2 deviation case(s) |
| expect().toThrow | jest.Matcher.ToThrow | match | 22 (14 compared) | 8 deviation case(s) |
| expect().toThrowError | jest.Matcher.ToThrow | match | 3 (3 compared) | |
| expect.addEqualityTesters | — | missing | — | no custom-equality-tester registry |
| expect.any | jest.Any | differs | 14 (13 compared) | disagrees on: any-null-actual, any-object-on-array; 1 deviation case(s) |
| expect.anything | jest.Anything | match | 6 (6 compared) | |
| expect.arrayContaining | jest.ArrayContaining | match | 7 (7 compared) | |
| expect.assertions | jest.Assertions | untested | — | assertion counting; needs a test lifecycle, not a matcher call |
| expect.closeTo | jest.CloseTo | match | 7 (7 compared) | |
| expect.extend | jest.Extend | untested | — | custom matchers; no pass/fail case written |
| expect.extractExpectedAssertionsErrors | — | missing | — | internal to expect |
| expect.getState | — | missing | — | matcher state is not exposed by the port |
| expect.hasAssertions | jest.HasAssertions | untested | — | assertion counting; needs a test lifecycle |
| expect.objectContaining | jest.ObjectContaining | differs | 7 (7 compared) | disagrees on: objectcontaining-on-array |
| expect.setState | — | missing | — | matcher state is not exposed by the port |
| expect.stringContaining | jest.StringContaining | match | 5 (5 compared) | |
| expect.stringMatching | jest.StringMatching | match | 5 (5 compared) | |
| expect.not.arrayContaining | jest.NotArrayContaining | match | 2 (2 compared) | |
| expect.not.closeTo | — | missing | — | no NotCloseTo, though the other four Not* constructors exist — cases not-closeto-hit, not-closeto-miss |
| expect.not.objectContaining | jest.NotObjectContaining | match | 2 (2 compared) | |
| expect.not.stringContaining | jest.NotStringContaining | match | 2 (2 compared) | |
| expect.not.stringMatching | jest.NotStringMatching | match | 2 (2 compared) | |
| — | jest.Matcher.ToHaveLen | extra | — | Go-spelled alias of ToHaveLength |
| — | jest.Matcher.ToBeTrue / ToBeFalse | extra | — | stricter than ToBeTruthy/ToBeFalsy: require an actual bool |
| — | jest.Matcher.ToBeNil | extra | — | Go spelling alongside ToBeNull |
| — | jest.Matcher.ToPanic | extra | — | Go-native spelling of ToThrow |
| — | jest.Matcher.ToBeOneOf | extra | — | exists in jest 30, not in expect@29.7.0 |
| — | jest.Matcher.To(name, args…) | extra | — | dispatch for Extend-registered custom matchers |
| — | jest.NotArrayContaining / NotObjectContaining / NotStringContaining / NotStringMatching | extra | — | upstream reaches these through the expect.not namespace rather than distinct constructors; scored above against expect.not.* |
Every case the harness streamed to both runners, with the exact upstream symbol and Go symbol it exercised. A deliberate, documented difference is a deviation and is counted apart from a mismatch.
| Case | Group | Upstream symbol | Go symbol | Status | Note |
|---|---|---|---|---|---|
| any-string-hit | asymmetric | expect.any | jest.Any | match | |
| any-string-miss | asymmetric | expect.any | jest.Any | match | |
| any-number-hit | asymmetric | expect.any | jest.Any | match | |
| any-number-nan | asymmetric | expect.any | jest.Any | match | NaN is still typeof number |
| any-boolean-hit | asymmetric | expect.any | jest.Any | match | |
| any-array-hit | asymmetric | expect.any | jest.Any | match | |
| any-object-hit | asymmetric | expect.any | jest.Any | match | |
| any-object-on-array | asymmetric | expect.any | jest.Any | mismatch | an array is an instanceof Object in JS but []any is not assignable to map[string]any in Go |
| any-error-hit | asymmetric | expect.any | jest.Any | match | |
| any-error-on-typeerror | asymmetric | expect.any | jest.Any | deviation | Any takes a sample value, so it compares concrete types; a TypeError is not assignable to the sample's *errors.errorString |
| any-date-hit | asymmetric | expect.any | jest.Any | match | |
| any-nested-in-object | asymmetric | expect.any | jest.Any | match | |
| any-nested-in-array | asymmetric | expect.any | jest.Any | match | |
| any-null-actual | asymmetric | expect.any | jest.Any | mismatch | |
| anything-number | asymmetric | expect.anything | jest.Anything | match | |
| anything-empty-str | asymmetric | expect.anything | jest.Anything | match | |
| anything-null | asymmetric | expect.anything | jest.Anything | match | anything() rejects null and undefined |
| anything-undefined | asymmetric | expect.anything | jest.Anything | match | |
| anything-nested | asymmetric | expect.anything | jest.Anything | match | |
| anything-nested-null | asymmetric | expect.anything | jest.Anything | match | |
| arraycontaining-hit | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-miss | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-empty | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-deep-members | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-nested-asym | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-on-non-array | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| arraycontaining-in-object | asymmetric | expect.arrayContaining | jest.ArrayContaining | match | |
| not-arraycontaining-hit | asymmetric | expect.not.arrayContaining | jest.NotArrayContaining | match | |
| not-arraycontaining-miss | asymmetric | expect.not.arrayContaining | jest.NotArrayContaining | match | |
| objectcontaining-hit | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-miss-value | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-miss-key | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-empty | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-nested-asym | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-nested-object | asymmetric | expect.objectContaining | jest.ObjectContaining | match | |
| objectcontaining-on-array | asymmetric | expect.objectContaining | jest.ObjectContaining | mismatch | |
| not-objectcontaining-hit | asymmetric | expect.not.objectContaining | jest.NotObjectContaining | match | |
| not-objectcontaining-miss | asymmetric | expect.not.objectContaining | jest.NotObjectContaining | match | |
| stringcontaining-hit | asymmetric | expect.stringContaining | jest.StringContaining | match | |
| stringcontaining-miss | asymmetric | expect.stringContaining | jest.StringContaining | match | |
| stringcontaining-empty | asymmetric | expect.stringContaining | jest.StringContaining | match | |
| stringcontaining-non-string | asymmetric | expect.stringContaining | jest.StringContaining | match | |
| stringcontaining-nested | asymmetric | expect.stringContaining | jest.StringContaining | match | |
| not-stringcontaining-hit | asymmetric | expect.not.stringContaining | jest.NotStringContaining | match | |
| not-stringcontaining-miss | asymmetric | expect.not.stringContaining | jest.NotStringContaining | match | |
| stringmatching-hit | asymmetric | expect.stringMatching | jest.StringMatching | match | |
| stringmatching-miss | asymmetric | expect.stringMatching | jest.StringMatching | match | |
| stringmatching-anchored | asymmetric | expect.stringMatching | jest.StringMatching | match | |
| stringmatching-non-string | asymmetric | expect.stringMatching | jest.StringMatching | match | |
| stringmatching-nested | asymmetric | expect.stringMatching | jest.StringMatching | match | |
| not-stringmatching-hit | asymmetric | expect.not.stringMatching | jest.NotStringMatching | match | |
| not-stringmatching-miss | asymmetric | expect.not.stringMatching | jest.NotStringMatching | match | |
| closeto-asym-default-hit | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-default-miss | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-prec-hit | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-prec-miss | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-nested | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-non-number | asymmetric | expect.closeTo | jest.CloseTo | match | |
| closeto-asym-nan | asymmetric | expect.closeTo | jest.CloseTo | match | |
| not-closeto-hit | asymmetric | expect.not.closeTo | — | deviation | the port has no Not(CloseTo(...)) constructor; NotArrayContaining/NotObjectContaining/NotStringContaining/NotStringMatching exist but there is no NotCloseTo |
| not-closeto-miss | asymmetric | expect.not.closeTo | — | deviation | the port has no Not(CloseTo(...)) constructor |
| contain-arr-hit | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-arr-miss | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-arr-reference | collections | expect().toContain | jest.Matcher.ToContain | mismatch | toContain uses reference equality, so a structurally equal object is not contained |
| contain-arr-nan | collections | expect().toContain | jest.Matcher.ToContain | match | toContain uses indexOf-like equality; NaN is a classic edge |
| contain-arr-negzero | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-arr-str-vs-num | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-arr-null | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-empty-arr | collections | expect().toContain | jest.Matcher.ToContain | match | |
| contain-set-hit | collections | expect().toContain | jest.Matcher.ToContain | deviation | Go has no Set type; the harness models one as map[any]struct{} and the port then checks keys |
| contain-arr-not-miss | collections | expect().not.toContain | jest.Matcher.Not().ToContain | match | |
| containequal-obj-hit | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | match | |
| containequal-obj-miss | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | match | |
| containequal-nested | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | match | |
| containequal-scalar | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | match | |
| containequal-nan | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | mismatch | |
| containequal-undefined-prop | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | mismatch | |
| containequal-empty | collections | expect().toContainEqual | jest.Matcher.ToContainEqual | match | |
| containequal-not-miss | collections | expect().not.toContainEqual | jest.Matcher.Not().ToContainEqual | match | |
| havelength-arr-ok | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-arr-wrong | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-empty-arr | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-str | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-str-unicode | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | mismatch | JS counts UTF-16 code units; Go counts bytes |
| havelength-str-astral | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | mismatch | one astral char is 2 UTF-16 code units in JS and 4 bytes in Go |
| havelength-sparse | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-map | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | mismatch | a JS Map has no .length, so upstream rejects it; Go maps do have a length |
| havelength-obj | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | mismatch | a plain object has no .length in JS |
| havelength-number | collections | expect().toHaveLength | jest.Matcher.ToHaveLength | match | |
| havelength-not-wrong | collections | expect().not.toHaveLength | jest.Matcher.Not().ToHaveLength | match | |
| matchobject-subset | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-wrong-value | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-missing-key | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-nested-subset | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-nested-wrong | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-array-exact | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-array-subset-rejected | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | arrays must match in length under toMatchObject |
| matchobject-with-asymmetric | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-undefined-expected | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match | |
| matchobject-empty-expected | collections | expect().toMatchObject | jest.Matcher.ToMatchObject | match |