fix(snapshot): canonicalize macOS cwd tokens

This commit is contained in:
Hypatia May
2026-07-31 09:45:48 +08:00
parent ff8c5600f4
commit 00cc600b14
11 changed files with 36 additions and 15 deletions

View File

@@ -197,7 +197,7 @@ function tokenizeFixtureString(value: string, ctx: NormalizeContext, basename: s
+ String.raw`(?=$|[\\/\s<>'"()\[\]{},;:!?=])`,
'g',
)
return exact.replace(absoluteCwd, CWD)
return exact.replace(absoluteCwd, CWD).split(`/private${CWD}`).join(CWD)
}
/** Recursively replace generated-cwd spellings while preserving every other JSON value. */