Skip to content
Draft
Show file tree
Hide file tree
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: 11 additions & 0 deletions build/Program.fs
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,15 @@ let initTargets () =
r.Errors |> List.iter (Trace.tracefn "%s")
failwith "Error running fantomas")

// TypeCheck: runs Fable compilation only (no webpack) to quickly verify F# type correctness.
// Faster than the full Build target β€” useful for CI checks that only need type-checking.
Target.create "TypeCheck" (fun _ ->
Fable.run
{ Fable.DefaultArgs with
Command = Fable.Build
Debug = false
Webpack = Fable.WithoutWebpack })

Target.create "Default" ignore
Target.create "Build" ignore
Target.create "BuildDev" ignore
Expand All @@ -378,6 +387,8 @@ let buildTargetTree () =
"YarnInstall" ==>! "RunScript"
"DotNetRestore" ==>! "RunScript"

"DotNetRestore" ==>! "TypeCheck"

"Clean" ==> "Format" ==> "RunScript" ==> "CopyGrammar" ==> "CopySchemas"
==>! "Default"

Expand Down
10 changes: 7 additions & 3 deletions src/Components/TestExplorer.fs
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,14 @@ module ArrayExt =
: ('Left array * ('Left * 'Right) array * 'Right array) =
let leftIdMap =
left
|> Array.distinctBy leftIdf // guard against duplicate IDs (e.g. xUnit MemberData with no unique display name)
|> Array.map (fun l -> (leftIdf l, l))
|> dict
|> Collections.Generic.Dictionary

let rightIdMap =
right
|> Array.distinctBy rightIdf // guard against duplicate IDs (e.g. xUnit MemberData with no unique display name)
|> Array.map (fun r -> (rightIdf r, r))
|> dict
|> Collections.Generic.Dictionary
Expand Down Expand Up @@ -281,9 +283,11 @@ module TestItemDTO =
dto.FullName + "." + dto.DisplayName
| Some TestFrameworkId.XUnit ->
// NOTE: XUnit includes the FullyQualifiedName in the DisplayName.
// But it doesn't nest theory cases, just appends the case parameters
if dto.DisplayName <> dto.FullName then
let theoryCaseFragment = dto.DisplayName.Split('.') |> Array.last
// But it doesn't nest theory cases, just appends the case parameters.
// We use Substring rather than Split('.') to avoid splitting on dots inside
// float parameters (e.g. "0.5") or record ToString values.
if dto.DisplayName.StartsWith(dto.FullName) && dto.DisplayName.Length > dto.FullName.Length then
let theoryCaseFragment = dto.DisplayName.Substring(dto.FullName.Length)
dto.FullName + "." + theoryCaseFragment
else
dto.FullName
Expand Down
Loading