File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ applies_to:
2424"""
2525 [<Fact>]
2626 let ``apply matches expected`` () =
27- markdown |> appliesTo ( Unchecked.defaultof< ApplicableTo>)
27+ markdown |> appliesTo Unchecked.defaultof< ApplicableTo>
2828
2929type ``apply default to top level arguments`` () =
3030 static let markdown = frontMatter """
@@ -212,7 +212,7 @@ applies_to:
212212"""
213213 [<Fact>]
214214 let ``does not render label`` () =
215- markdown |> appliesTo ( Unchecked.defaultof< ApplicableTo>)
215+ markdown |> appliesTo Unchecked.defaultof< ApplicableTo>
216216
217217type ``parses applies_to with multiple categories in any order`` () =
218218 static let markdown = frontMatter """
Original file line number Diff line number Diff line change @@ -27,16 +27,19 @@ module MarkdownDocumentAssertions =
2727 unsupportedBlocks
2828
2929 [<DebuggerStepThrough>]
30- let appliesTo ( expectedAvailability : ApplicableTo ) ( actual : Lazy < GeneratorResults >) =
30+ let appliesTo ( expectedAvailability : ApplicableTo | null ) ( actual : Lazy < GeneratorResults >) =
3131 let actual = actual.Value
3232 let result = actual.MarkdownResults |> Seq.find ( fun r -> r.File.RelativePath = " index.md" )
3333 let matter = result.File.YamlFrontMatter
3434 match matter with
3535 | NonNull m ->
36- m.AppliesTo.Diagnostics <- expectedAvailability.Diagnostics
36+ match expectedAvailability with
37+ | NonNull a -> m.AppliesTo.Diagnostics <- a.Diagnostics
38+ | _ -> ()
39+
3740 let apply = m.AppliesTo
3841 test <@ apply = expectedAvailability @>
39- | _ -> failwithf " %s has no yamlfront matter" result.File.RelativePath
42+ | _ -> failwithf $ " %s {result.File.RelativePath} has no yamlfront matter"
4043
4144
4245 [<DebuggerStepThrough>]
You can’t perform that action at this time.
0 commit comments