Skip to content

Commit 6fecc9a

Browse files
committed
Test(FavourIgnoreOverLetWild): add a failure test
1 parent cc2d7fd commit 6fecc9a

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

tests/FSharpLint.Core.Tests/Rules/Binding/FavourIgnoreOverLetWild.fs

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,20 @@ let a = List.iter (fun x -> ()) []
5050

5151
Assert.IsFalse(this.ErrorsExist)
5252

53+
[<Test>]
54+
member this.LetWildcardUnitValueSuggestedFix() =
55+
let source = """
56+
module Program
57+
58+
let _ = ()"""
59+
let expected = """
60+
module Program
61+
62+
(()) |> ignore"""
63+
this.Parse source
64+
65+
Assert.IsTrue(this.ErrorExistsAt(4, 4))
66+
67+
let result = this.ApplyQuickFix source
68+
69+
Assert.AreEqual(expected, result)

0 commit comments

Comments
 (0)