mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-08-16 19:40:22 +03:00
Fix invalid Elm source code in tests
This commit is contained in:
parent
06237c7fc9
commit
5a82e53388
@ -139,9 +139,8 @@ button = 1
|
|||||||
\() ->
|
\() ->
|
||||||
testRuleWithHtmlDependency """
|
testRuleWithHtmlDependency """
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
a = let
|
a = let button = 1
|
||||||
button = 1
|
in button
|
||||||
in button
|
|
||||||
"""
|
"""
|
||||||
|> Review.Test.expectNoErrors
|
|> 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" <|
|
, 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 """
|
testRuleWithHtmlDependency """
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
a = let
|
a = let button = 1
|
||||||
button = 1
|
in button
|
||||||
in button
|
|
||||||
"""
|
"""
|
||||||
|> Review.Test.expectNoErrors
|
|> 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" <|
|
, 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 """
|
testRuleWithHtmlDependency """
|
||||||
import Html exposing (..)
|
import Html exposing (..)
|
||||||
a = let
|
a = let button = 1
|
||||||
button = 1
|
in 2
|
||||||
in 2
|
|
||||||
b = button
|
b = button
|
||||||
"""
|
"""
|
||||||
|> Review.Test.expectErrors
|
|> Review.Test.expectErrors
|
||||||
@ -176,7 +173,7 @@ b = button
|
|||||||
, details = details
|
, details = details
|
||||||
, under = "button"
|
, 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" <|
|
, test "should not report the use of `button` if it is shadowed by an accessible parameter" <|
|
||||||
\() ->
|
\() ->
|
||||||
|
Loading…
Reference in New Issue
Block a user