Skip to content

Commit 0b25137

Browse files
committed
Tests(AvoidSinglePipeOperator): add more tests
1 parent f78d63e commit 0b25137

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
@@ -122,3 +122,21 @@ let someFunc someParam =
122122

123123
Assert.IsTrue this.ErrorsExist
124124

125+
[<Test>]
126+
member this.``Use pipe operator twice on record``() =
127+
this.Parse """
128+
type Person =
129+
{
130+
FirstName: string
131+
}
132+
133+
let someFunc someParam =
134+
if someParam then
135+
{ FirstName = "Bar" }
136+
|> someOtherFunc
137+
|> yetAnotherFunc
138+
else
139+
Array.empty
140+
"""
141+
142+
Assert.IsTrue this.NoErrorsExist

0 commit comments

Comments
 (0)