Skip to content

Commit ec64b1a

Browse files
committed
Fix tests disappearing from the explorer when their file is edited
1 parent e02cf6f commit ec64b1a

File tree

1 file changed

+2
-9
lines changed

1 file changed

+2
-9
lines changed

src/Components/TestExplorer.fs

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1032,7 +1032,6 @@ module TestDiscovery =
10321032
(targetCollection: TestItemCollection)
10331033
(previousCodeTests: TestItem array)
10341034
(newCodeTests: TestItem array)
1035-
(isKnownDisplacedFragment: CodeBasedTestId -> bool)
10361035
=
10371036
let rangeComparable (maybeRange: Vscode.Range option) =
10381037
let positionComparable (p: Vscode.Position) = $"{p.line}:{p.character}"
@@ -1053,9 +1052,7 @@ module TestDiscovery =
10531052

10541053
removed |> Array.map TestItem.getId |> Array.iter targetCollection.delete
10551054

1056-
added
1057-
|> Array.filter (TestItem.getId >> isKnownDisplacedFragment)
1058-
|> Array.iter targetCollection.add
1055+
added |> Array.iter targetCollection.add
10591056

10601057
unchanged
10611058
|> Array.iter (fun (previousCodeTest, newCodeTest) ->
@@ -1768,11 +1765,7 @@ module Interactions =
17681765
match cached with
17691766
| None -> ()
17701767
| Some previousTestsFromSameCode ->
1771-
TestDiscovery.mergeCodeUpdates
1772-
rootTestCollection
1773-
previousTestsFromSameCode
1774-
testsFromCode
1775-
displacedFragmentMapCache.ContainsKey
1768+
TestDiscovery.mergeCodeUpdates rootTestCollection previousTestsFromSameCode testsFromCode
17761769

17771770
testsPerFileCache[filePath] <- testsFromCode
17781771

0 commit comments

Comments
 (0)