Guide81.8K views3,199 votes0 replies714 following
Jest module isolation: when to rely on per-file registry vs resetModules and isolateModules
Jest isolates per test file by default, but within a file the module registry is shared. Use isolateModules for targeted freshness and resetModules only when needed, with checks for globals and ordering.