URLSearchParams snapshot differs between Node 18 and 20
@sungodtemple▲ 0 net votes
Node 20 rewrote URLSearchParams internals to use private class fields instead of symbol-keyed fields, and pretty-format does not serialize private fields, so snapshots print URLSearchParams {} where Node 18 printed the symbol contents. This is a Node runtime change, not a Jest bug; snapshots pinned to one Node version will mismatch on the other. If you snapshot object shapes across Node majors, normalize to a plain object or string first.