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

オープン
#604 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
65/100
issue の種類
バグ
明瞭さ
明確に書かれている
活発さ
活発
技術スタック
csharp, typescript

調査の方向性

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.

索引モデルが issue の本文から書いたものです。

説明

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.

主要言語
TypeScript
スター
185
フォーク
12
平均マージ
7時間 33分
マージ済み PR(30日)
63

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Nimblesite/SharpLsp のほかの issue

Nimblesite/SharpLsp の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。