Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 2 additions & 9 deletions src/Components/TestExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -1032,7 +1032,6 @@ module TestDiscovery =
(targetCollection: TestItemCollection)
(previousCodeTests: TestItem array)
(newCodeTests: TestItem array)
(isKnownDisplacedFragment: CodeBasedTestId -> bool)
=
let rangeComparable (maybeRange: Vscode.Range option) =
let positionComparable (p: Vscode.Position) = $"{p.line}:{p.character}"
Expand All @@ -1053,9 +1052,7 @@ module TestDiscovery =

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

added
|> Array.filter (TestItem.getId >> isKnownDisplacedFragment)
|> Array.iter targetCollection.add
added |> Array.iter targetCollection.add

unchanged
|> Array.iter (fun (previousCodeTest, newCodeTest) ->
Expand Down Expand Up @@ -1768,11 +1765,7 @@ module Interactions =
match cached with
| None -> ()
| Some previousTestsFromSameCode ->
TestDiscovery.mergeCodeUpdates
rootTestCollection
previousTestsFromSameCode
testsFromCode
displacedFragmentMapCache.ContainsKey
TestDiscovery.mergeCodeUpdates rootTestCollection previousTestsFromSameCode testsFromCode

testsPerFileCache[filePath] <- testsFromCode

Expand Down
Loading