oracle-gaps: refuse at baseline when more than one Vitest copy is loaded

Offen
#66 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
1-2 Tage
Anfängerfreundlichkeit
35/100
Issue-Typ
Feature
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
javascript
Bereich
testing-qa

Rechercherichtung

Start with the baseline and harness code that runs the oracle file and the driver's use of vi.advanceTimersByTime and vi.useFakeTimers, and find where the resolved vitest path is available. The issue asks for a check comparing the vitest path from the harness, the framework, and the test file, which means the baseline must refuse with a fix line when they differ. Done means a test reproduces two loaded vitest copies and the run stops with the setup error instead of recording a law violation.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

Reported from an adopter's first session, at c58b0c2. Not yet reproduced here.

Problem. pnpm installed [email protected] twice, once for each @types/node peer. The runner used one copy, while @tanstack/oracles and the oracle file shared the other. So useOracleClock's vi.useFakeTimers and the driver's vi.advanceTimersByTime ran on different copies, and the run failed with "A function to advance timers was called but the timers APIs are not mocked". The driver records thrown errors as observations, so the baseline reported the failure as a law violation (visible order, at checkpoint error). It took a replay to see that the setup was the cause.

Proposal. The baseline should refuse, with a fix line, when more than one vitest instance is loaded. One way to check: compare the resolved vitest path from the harness, from the framework, and from the test file. This is a harness failure, so it should stop the run and not be charged to a mutant (cleanup plan, Phase 2 A2).

This issue was written by Isaac.

Vorherrschende Sprache
JavaScript
Sterne
5
Forks
1
Ø Merge
8 Std. 31 Min.
Gemergte PRs (30 T.)
60

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus TanStack/oracles

Alle Issues in TanStack/oracles

Ähnliche Issues

Weitere Issues zu JavaScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.