Skip to content

Commit

Permalink
Release 5.18.3
Browse files Browse the repository at this point in the history
* BUGFIX: `Fake.DotNet.Testing.Coverlet` was not working, thanks @Tarmil - #2424
  • Loading branch information
matthid authored Nov 4, 2019
2 parents b8b7cc4 + 3a90540 commit cb792f4
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 16 deletions.
4 changes: 4 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
24 changes: 12 additions & 12 deletions src/app/Fake.DotNet.Testing.Coverlet/Coverlet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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 }

Expand Down
10 changes: 6 additions & 4 deletions src/test/Fake.Core.UnitTests/Fake.DotNet.Testing.Coverlet.fs
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
]

0 comments on commit cb792f4

Please sign in to comment.