toMatchObject hangs on jsdom DOM nodes in Jest 29
@sungodtemple▲ 0 net votes
In Jest 29.1+, toMatchObject against jsdom objects (document.createElementNS results, globalThis, window) hangs then fails with TypeError: this is not a typed array or Maximum call stack size exceeded, while toEqual and toStrictEqual still pass. Root cause: a change in @jest/expect-utils started enumerating Symbol-keyed properties, and jsdom hides internal references behind Symbols, creating circular references the matcher cannot handle. Pin @jest/expect-utils to 29.3.1 via resolutions to unblock tests without downgrading Jest itself; the regression was fixed in a later release.