You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(core): return OS-native testPath/filepath at user-facing surfaces
`expect.getState().testPath` and the lifecycle hook `ctx.filepath` are real
on-disk paths surfaced to users, but they were emitted in POSIX form (forward
slashes), so on Windows they diverged from `import.meta.filename` / `__filename`
(which the rspack plugin injects in native form). A user comparing them — e.g.
`expect.getState().testPath === import.meta.filename` — failed on Windows.
Internally `testPath` must stay POSIX: the snapshot client, reporter relative
paths, and the related-graph lookup all run it through `pathe`, which only
understands `/`. So convert to native separators only at the two user-facing
boundaries (the `setState` testPath and the hook context `filepath`) via a
small `toNativePath` helper, leaving every internal consumer untouched.
Closes#1465
0 commit comments