Test Explorer 'fsharp' tag is guessed from the test name: real Expecto tests are untagged, C# 'Property' tests are tagged F#

Aperta
#604 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
csharp, typescript

Direzione di ricerca

Start with test-items.ts and test-targets.ts, then read the listed assertions in test-explorer-assert-kit.ts, test-explorer-frameworks.test.ts, and testing-lens-e2e.test.ts. Trace how project language reaches each test item; verify the fsharp tag follows .fsproj projects across frameworks and is absent for C# tests. Update the affected assertions and run the relevant suites.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug

What happens

test-items.ts makeTestItem tags a row fsharp when isExpectoTest(name) || isFsCheckTest(name) (test-targets.ts). Both are substring checks on the test name:

  • isExpectoTest: name contains Expecto, testCase or testList
  • isFsCheckTest: name contains FsCheck or Property

A real Expecto test's id is its list path, e.g. calculator.adds two numbers (see test-explorer-expecto.test.ts). It contains none of those words, so no real Expecto test is ever tagged fsharp. A C# test such as MyApp.Tests.PropertyTests.Roundtrips contains Property, so it is tagged fsharp.

Expected

The fsharp tag comes from the language of the project that built the test (an .fsproj), not from a guess at the name. It applies to every F# test (xUnit, NUnit, MSTest, Expecto, FsCheck) and to no C# test.

Notes

Several suites currently assert the name-based behaviour (assertSnapshotUriShape in test-explorer-assert-kit.ts: "no row carries a framework tag"; assertItemShape in test-explorer-frameworks.test.ts; testing-lens-e2e.test.ts). They need to be updated together with the fix. Tracked in docs/plans/CSDEVKIT-PARITY-PLAN.md P2.2.

Lingua principale
TypeScript
Stelle
185
Fork
12
Merge medio
7h 33m
PR unite (30g)
63

Preparare l'ambiente

Apri in Codespaces

Avvia il container di sviluppo del progetto nel browser, con il tuo account GitHub.

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Nimblesite/SharpLsp

Tutte le issue di Nimblesite/SharpLsp

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.