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
constImmutable=require("immutable");it("passed in jest 27.5.1, but failure in jest 28.1.3",()=>{classMyRecordextendsImmutable.Record({dummy: ""}){}consta=newMyRecord().merge({dummy: "data"});constb=newMyRecord().set("dummy","data");expect(Immutable.is(a,b)).toBe(true);expect(a).toEqual(b);});
Expected behavior
I expect to pass the test.
Actual behavior
The isEqual test fails.
● passed in jest 27.5.1, but failure in jest 28.1.3
expect(received).toEqual(expected) // deep equality
Expected: Immutable.Record {"dummy": "data"}
Received: serializes to the same string
9 | console.log(b._values._tail.ownerID);
10 | expect(Immutable.is(a, b)).toBe(true);
> 11 | expect(a).toEqual(b);
| ^
12 | });
13 |
Additional context
This issue is similar to #12752, #12860, and #12976.
The reason to fail may be same these issues.
Immutable.Record has values of Immutable.List. The test fails because change values._tail.ownerID by the operation.
console.log
a._values._tail.ownerID: OwnerID {}
at Object.log (__tests__/index.test.js:8:11)
console.log
b._values._tail.ownerID: undefined
at Object.log (__tests__/index.test.js:9:11)
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.
Version
28.1.3
Steps to reproduce
yarn install immutable jest
Expected behavior
I expect to pass the test.
Actual behavior
The
isEqual
test fails.Additional context
This issue is similar to #12752, #12860, and #12976.
The reason to fail may be same these issues.
Immutable.Record has
values
of Immutable.List. The test fails because changevalues._tail.ownerID
by the operation.Environment
The text was updated successfully, but these errors were encountered: