Recommended when non-string keys are actually needed. It uses native
JavaScript Map objects, so keys keep their constructed types instead of
being converted to strings.
It is not the default to avoid widespread breaking changes in existing
projects. Map has a different access API and does not pass deep equality
checks against {}-based fixtures. Alongside the other changes in v5,
making it the default was considered too disruptive.
If these differences are acceptable for your project, we recommend using
realMapTag to guarantee the absence of problems and side effects.
Recommended when non-string keys are actually needed. It uses native JavaScript
Mapobjects, so keys keep their constructed types instead of being converted to strings.It is not the default to avoid widespread breaking changes in existing projects.
Maphas a different access API and does not pass deep equality checks against{}-based fixtures. Alongside the other changes in v5, making it the default was considered too disruptive.If these differences are acceptable for your project, we recommend using realMapTag to guarantee the absence of problems and side effects.