Skip to content

Commit 98cb562

Browse files
committed
Tests.Core: add a failure test
1 parent 8a01dc4 commit 98cb562

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

tests/FSharpLint.Core.Tests/Rules/Conventions/AvoidSinglePipeOperator.fs

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,3 +104,21 @@ let foo param =
104104
"""
105105

106106
Assert.True this.NoErrorsExist
107+
108+
[<Test>]
109+
member this.``Use pipe operator once on record``() =
110+
this.Parse """
111+
type Person =
112+
{
113+
FirstName: string
114+
}
115+
116+
let someFunc someParam =
117+
if someParam then
118+
{ FirstName = "Bar" } |> someOtherFunc
119+
else
120+
Array.empty
121+
"""
122+
123+
Assert.IsTrue this.ErrorsExist
124+

0 commit comments

Comments
 (0)