diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index 70cd6664591..39358219784 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,9 @@ # Release Notes +## 5.18.3 - 2019-11-04 + +* BUGFIX: `Fake.DotNet.Testing.Coverlet` was not working, thanks @Tarmil - https://github.com/fsharp/FAKE/pull/2424 + ## 5.18.2 - 2019-10-26 * NEW: Add `Fake.DotNet.Testing.Coverlet`, thanks @Tarmil - https://github.com/fsharp/FAKE/pull/2413 diff --git a/src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs b/src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs index 0eae906531a..a805ba7353e 100644 --- a/src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs +++ b/src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs @@ -89,28 +89,28 @@ let withMSBuildArguments (param: CoverletParams -> CoverletParams) (args: MSBuil let param = param defaults let properties = [ - "CollectCoverage", "true" - "OutputFormat", outputFormatToString param.OutputFormat - "CoverletOutput", param.Output + yield "CollectCoverage", "true" + yield "OutputFormat", outputFormatToString param.OutputFormat + yield "CoverletOutput", param.Output if not (List.isEmpty param.Include) then - "Include", namespacesToString param.Include + yield "Include", namespacesToString param.Include if not (List.isEmpty param.Exclude) then - "Exclude", namespacesToString param.Exclude + yield "Exclude", namespacesToString param.Exclude if not (List.isEmpty param.ExcludeByAttribute) then - "ExcludeByAttribute", String.concat "," param.ExcludeByAttribute + yield "ExcludeByAttribute", String.concat "," param.ExcludeByAttribute if not (List.isEmpty param.ExcludeByFile) then - "ExcludeByFile", String.concat "," param.ExcludeByFile + yield "ExcludeByFile", String.concat "," param.ExcludeByFile match param.MergeWith with - | Some f -> "MergeWith", f + | Some f -> yield "MergeWith", f | None -> () match param.Threshold with | Some t -> - "Threshold", string t - "ThresholdType", thresholdTypeToString param.ThresholdType - "ThresholdStat", thresholdStatToString param.ThresholdStat + yield "Threshold", string t + yield "ThresholdType", thresholdTypeToString param.ThresholdType + yield "ThresholdStat", thresholdStatToString param.ThresholdStat | None -> () if param.UseSourceLink then - "UseSourceLink", "true" + yield "UseSourceLink", "true" ] { args with Properties = args.Properties @ properties } diff --git a/src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs b/src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs index 196cb9897bc..8c578665357 100644 --- a/src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs +++ b/src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs @@ -34,7 +34,8 @@ let tests = ThresholdStat = Coverlet.ThresholdStat.Total UseSourceLink = true }) - Expect.containsAll [ + Expect.isTrue (props.Length > 0) "Result should contain some elements" + Expect.containsAll props [ "CollectCoverage", "true" "CoverletOutput", "coverage.json" "OutputFormat", "cobertura" @@ -47,13 +48,14 @@ let tests = "ThresholdType", "branch" "ThresholdStat", "total" "UseSourceLink", "true" - ] props "expected proper MSBuild properties" + ] "expected proper MSBuild properties" testCase "Test that default properties are converted" <| fun _ -> let props = getProps id - Expect.containsAll [ + Expect.isTrue (props.Length > 0) "Result should contain some elements" + Expect.containsAll props [ "CollectCoverage", "true" "CoverletOutput", "./" "OutputFormat", "json" - ] props "expected proper MSBuild properties" + ] "expected proper MSBuild properties" ]