Fantom's screenshotUtils-test.js fails on Windows: a test expects `/` in a path built with path.join
I maintainer di solito rispondono entro 2 giorni
Valutazione
- Difficoltà
- 1/5
- Tempo stimato
- Meno di un'ora
- Idoneità per principianti
- 35/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Ferma
- Stack tecnologico
- javascript, node.js, react-native
Direzione di ricerca
Read private/react-native-fantom/runner/screenshots/__tests__/screenshotUtils-test.js, especially the “creates new images next to Jest snapshots” test around lines 184–189. Run the reported Jest command on Windows to confirm the path separator failure; compare its assertion with the earlier path.join assertion. Done when the test passes on Windows and still checks that the image path is beside the test file. An open linked pull request is already addressing this issue.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Description
private/react-native-fantom/runner/screenshots/__tests__/screenshotUtils-test.js's test "creates new images next to Jest snapshots" checks result.expectedPath with toContain('__snapshots__/example-test.js.screenshots/') (L184-L189). That path is built with path.join, which joins with \ on Windows, so the test fails there. The test before it compares with path.join(directory, 'actual.diff.png') (L170-L172). The assertion came with https://github.com/react/react-native/pull/59483.
Steps to reproduce
- On Windows, in a checkout of
main(7a5d4ded60b) afteryarn install, runyarn jest private/react-native-fantom/runner/screenshots/__tests__/screenshotUtils-test.js -t "creates new images next to Jest snapshots"; or runnode repro.cjs <path to the checkout>from the reproducer below, which runs that one test and exits 1 while it fails.
Expected: the test passes on Windows, still checking that the new image is written under __snapshots__/example-test.js.screenshots/ beside the test file.
Actual: expect(received).toContain(expected) fails: the received path is C:\\Users\\…\\AppData\\Local\\Temp\\fantom-screenshot-test-VBIJPX\\__snapshots__\\example-test.js.screenshots\\image.png.
React Native Version
main at 7a5d4ded60b (nightly)
Affected Platforms
Build - Windows
Output of npx @react-native-community/cli info
Not applicable: this is a test in React Native's own repository. The reproducer's run:
react-native 7a5d4ded60b (2026-11-16), Windows_NT 10.0.26300, node v26.12.1, path.sep "\\"
Stacktrace or Logs
react-native 7a5d4ded60b (2026-11-16), Windows_NT 10.0.26300, node v26.12.1, path.sep "\\"
test file: private/react-native-fantom/runner/screenshots/__tests__/screenshotUtils-test.js
$ yarn jest private/react-native-fantom/runner/screenshots/__tests__/screenshotUtils-test.js -t "creates new images next to Jest snapshots"
jest exited 1
"creates new images next to Jest snapshots": failed
Error: expect(received).toContain(expected) // indexOf
Expected substring: "__snapshots__/example-test.js.screenshots/"
Received string: "C:\\Users\\…\\AppData\\Local\\Temp\\fantom-screenshot-test-VBIJPX\\__snapshots__\\example-test.js.screenshots\\image.png"
at Object.toContain (private\react-native-fantom\runner\screenshots\__tests__\screenshotUtils-test.js:187:31)
SUMMARY: "creates new images next to Jest snapshots" fails on Windows: expectedPath, built with path.join, is C:\Users\…\AppData\Local\Temp\fantom-screenshot-test-VBIJPX\__snapshots__\example-test.js.screenshots\image.png, which does not contain "__snapshots__/example-test.js.screenshots/"
MANDATORY Reproducer
https://gist.github.com/YevheniiKotyrlo/38bf06d3101dd5ee6f3208fd5afc7824 — node repro.cjs <path to a react-native checkout> exits 1 while the test fails and 0 once it passes.
Screenshots and Videos
No response
- Lingua principale
- C++
- Stelle
- 127k
- Fork
- 25.5k
- Merge medio
- 3g 22h
- PR unite (30g)
- 235
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di react/react-native
-
Needs: Author Feedback Needs: Repro
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
react/react-native#60059 · 1 commento ·
I maintainer di solito rispondono entro 2 giorni
-
Needs: Triage :mag:
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
react/react-native#60000 ·
I maintainer di solito rispondono entro 2 giorni
-
`yarn test-ios` exits before building RNTester: `objc-test.sh` launches the WebSocket server script #59433 deletedForse già presa @lazerg l’ha presa 4 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
react/react-native#59939 ·
I maintainer di solito rispondono entro 2 giorni
-
iOS Fabric pointer-handler reset leaves the next lone touch non-primaryForse già presa @alleneubank l’ha presa 6 giorni fa. Aperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
react/react-native#59919 ·
I maintainer di solito rispondono entro 2 giorni
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
react/react-native#59722 ·
I maintainer di solito rispondono entro 2 giorni
Tutte le issue di react/react-native
Issue simili
-
crash generated by fuzzer mlir
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
llvm/llvm-project#243218 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
petercorke/robotics-toolbox-python#943 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
realtime
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
NVIDIA/cuda-quantum#5913 ·
I maintainer di solito rispondono entro 1 giorno
-
[hidapi] update to 0.16.0Apertacategory:port-update
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 2 giorni
-
area:build bug
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
NatronGitHub/openfx-arena#71 ·
I maintainer di solito rispondono entro 1 giorno