CodeForPhilly / CodeForPhilly/codeforphilly-ng
Make apps/api test fixtures cross-platform (Windows)
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 5 T. 3 Std.
- Gemergte PRs (30 T.)
- 9
Beschreibung
Surfaced while closing out `plans/site-check-153.md` (PR #154).
On a Windows dev box the `apps/api` suite finishes 3 failed | 30 passed files, 10 failed | 413 passed tests, on a tree where `git diff develop..HEAD -- apps/api packages/` is empty. The failures spread across `scrub-data.test.ts` (4), `internal-reload.test.ts` (4), and `store.test.ts` (2), and reproduce with each file run alone, so it is not runner contention. Checking out `develop` and re-running `store.test.ts` reproduces its 2 failures exactly.
Mechanism (at least for `store.test.ts`): the fixture injects a write failure by pointing the private store at `/dev/null/impossible-path` and asserting the transaction rejects. On Windows that is an ordinary creatable directory, so the write succeeds and the expected throw never happens. The other seven likely share a POSIX-ism of the same flavor.
CI runs the gate on Linux where the fixtures behave as intended, so this only blocks the documented local validation gate on Windows. Worth a cross-platform fixture cleanup (e.g. a path that cannot exist on any OS, or a mocked write failure) if Windows dev boxes are to be supported.
Beitragsleitfaden
Für dieses Repository ist kein Beitragsleitfaden indexiert
Rechercherichtung
Beginne mit apps/api tests/scrub-data.test.ts, internal-reload.test.ts und store.test.ts, führe anschließend jede Datei einzeln unter Windows aus und vergleiche sie mit den Ergebnissen von develop. Untersuche die Fixtures, die auf POSIX-spezifischen Pfaden oder Fehlern beim Schreiben basieren. Als erledigt gilt die Aufgabe, wenn alle drei Dateien unter Windows bestehen und das bestehende Linux-Verhalten erhalten bleibt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- typescript
- Bereich
- api, testing
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Aktiv
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 78/100