prefer-whole-object-assertion
Collapse consecutive assertions on one object into a whole-object assertion so related mismatches are reported together.
Why
One whole-object assertion presents related expectations together and produces a complete structural diff.
Fix
Consider one toMatchObject assertion for ordinary data objects. Preserve missing-property checks, identity, and getter or proxy behavior when deciding whether to combine assertions.
Examples
expect(user.id).toBe(1);expect(user.name).toBe("Ada");expect(user).toMatchObject({ id: 1, name: "Ada" });Formerly: strict-test-assertions