I'm writing unit tests for my F# library using F#, Visual Studio Unit Testing Framework (aka MSTest) and FluentAssertions.
Test method should have return type either void or Task. In C# that's easy:
[TestMethod]
public void TestMethod1()
{
false.Should().BeFalse();
}
In F# I have the following:
[<TestMethod>]
member this.TestMethod1() =
false.Should().BeFalse(null)
|> ignore
Otherwise return type is changed to FluentAssertions.PrimitivesBooleanAssertions
so Test Runner doesn't see it.
How to avoid having |> ignore
in the end of each test?