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
{{ message }}
Repository navigation
On a Windows host, a test's file name reaches the device with backslashes #216
Run from a Windows host, context.task.file.name is src\__tests__\normal\smoke.harness.ts instead of src/__tests__/normal/smoke.harness.ts, so the playground's smoke.harness.ts fails:
expected 'src\__tests__\normal\smoke.harness.ts' to be 'src/__tests__/normal/smoke.harness.ts' // Object.is equality
The Jest runner names a test file with path.relative(rootDir, testPath) (packages/jest/src/run.ts, execute-run.ts), which uses the host's separator. The same name goes to the device as the module Metro bundles, with the setup files, and to the file hooks and diagnostics.
I have a fix that converts those names to forward slashes. I can open a PR.
System Info
System:
OS: Windows 11 10.0.26200
Binaries:
Node: 26.8.1
Device: Android emulator, API 35, x86_64
Activity
fix(jest): use forward slashes in test file names on Windows (callsta…