mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-09-11 16:16:09 +03:00
Add test
This commit is contained in:
parent
51fd359c58
commit
93cb8f89d8
@ -241,6 +241,22 @@ view model =
|
||||
, under = "model.a"
|
||||
}
|
||||
]
|
||||
, test "should report an error when encountering a reference to class function outside of a function call" <|
|
||||
\() ->
|
||||
"""module A exposing (..)
|
||||
import Html.Attributes
|
||||
|
||||
classListWithoutErrorsBeingReported =
|
||||
Html.Attributes.classList
|
||||
"""
|
||||
|> Review.Test.run (cssFiles [ "*.css" ] |> rule)
|
||||
|> Review.Test.expectErrors
|
||||
[ Review.Test.error
|
||||
{ message = "Class using function is used without all of its class functions"
|
||||
, details = [ "REPLACEME" ]
|
||||
, under = "Html.Attributes.classList"
|
||||
}
|
||||
]
|
||||
, test "should report an error when being unable to parse a CSS file" <|
|
||||
\() ->
|
||||
"""module A exposing (..)
|
||||
|
Loading…
Reference in New Issue
Block a user