Open
Description
Version
29.7.0
Steps to reproduce
- open https://codesandbox.io/p/devbox/2g2fys
- run "npm run test" in terminal
Expected behavior
I expect Jest not to fail, perhaps allow toEqual on the structured clone
Actual behavior
TypeError: Method Map.prototype.entries called on incompatible receiver #<Map>
Additional context
test("it should compare structured cloned maps within maps", () => {
const item = ["key", new Map([["key", "value"]])];
const map = new Map([structuredClone(item)]);
expect(map).toEqual(new Map([[item]]));
});
Environment
System:
OS: Linux 6.1 Debian GNU/Linux 12 (bookworm) 12 (bookworm)
CPU: (2) x64 AMD EPYC
Binaries:
Node: 20.12.0 - /usr/local/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.5.0 - /usr/local/bin/npm
pnpm: 8.15.6 - /usr/local/share/npm-global/bin/pnpm
npmPackages:
jest: ^29.7.0 => 29.7.0