From 5a82e53388b50ba32b396525185f6af61d1391f0 Mon Sep 17 00:00:00 2001 From: Jeroen Engels Date: Sat, 6 Jul 2024 08:36:47 +0200 Subject: [PATCH] Fix invalid Elm source code in tests --- tests/MiscRules/NoHtmlButtonTest.elm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/tests/MiscRules/NoHtmlButtonTest.elm b/tests/MiscRules/NoHtmlButtonTest.elm index 9e0f1465..b5302f7a 100644 --- a/tests/MiscRules/NoHtmlButtonTest.elm +++ b/tests/MiscRules/NoHtmlButtonTest.elm @@ -139,9 +139,8 @@ button = 1 \() -> testRuleWithHtmlDependency """ import Html exposing (..) -a = let - button = 1 - in button +a = let button = 1 + in button """ |> Review.Test.expectNoErrors , test "should not report the use of `button` when it has been imported using `exposing (..)` and the dependency is known, but it has been redefined at the top-level as a port" <| @@ -156,18 +155,16 @@ port button : (() -> msg) -> Sub msg \() -> testRuleWithHtmlDependency """ import Html exposing (..) -a = let - button = 1 - in button +a = let button = 1 + in button """ |> Review.Test.expectNoErrors , test "should report the use of `button` when it has been imported using `exposing (..)` and the dependency is known, and it has been redefined in an out-of-scope let..in declaration" <| \() -> testRuleWithHtmlDependency """ import Html exposing (..) -a = let - button = 1 - in 2 +a = let button = 1 + in 2 b = button """ |> Review.Test.expectErrors @@ -176,7 +173,7 @@ b = button , details = details , under = "button" } - |> Review.Test.atExactly { start = { row = 8, column = 5 }, end = { row = 8, column = 11 } } + |> Review.Test.atExactly { start = { row = 7, column = 5 }, end = { row = 7, column = 11 } } ] , test "should not report the use of `button` if it is shadowed by an accessible parameter" <| \() ->