You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
classClassWithPrivateJsField{
#_a: string;constructor(a: string){this.#_a =a;}geta(){returnthis.#_a;}}describe('toStrictEqual',()=>{describe('on class instances with private javascript fields',()=>{it('should not consider objects with different js-private field values via getter to be equal',()=>{expect(newClassWithPrivateJsField('v1')).not.toStrictEqual(newClassWithPrivateJsField('v2'));});});});
This issue might be somehow related to the follwing jest issues, but I am not 100% sure as there are errors thrown in those issues. In my case with ts-jesttoStrictEqual just considers both instances as equal although they are not.
Version
29.0.3
Steps to reproduce
Execute the following test that fails:
Also see https://stackblitz.com/edit/node-5wy1ts?file=index.spec.ts
Expected behavior
The test above should be successful
Actual behavior
The test above fails
Debug log
See stackblitz
Additional context
This issue might be somehow related to the follwing jest issues, but I am not 100% sure as there are errors thrown in those issues. In my case with
ts-jest
toStrictEqual
just considers both instances as equal although they are not.Environment
System: OS: Linux 5.0 undefined CPU: (8) x64 Intel(R) Core(TM) i9-9880H CPU @ 2.30GHz Binaries: Node: 16.14.2 - /usr/local/bin/node Yarn: 1.22.19 - /usr/local/bin/yarn npm: 7.17.0 - /usr/local/bin/npm npmPackages: jest: ^29.2.2 => 29.2.2
The text was updated successfully, but these errors were encountered: