mirror of
https://github.com/jfmengels/elm-review.git
synced 2024-12-24 02:02:29 +03:00
Add test for unexpectedConfigurationErrorDetails
This commit is contained in:
parent
fae198f186
commit
d90bfb46cb
@ -19,6 +19,7 @@ all =
|
||||
, underMismatchTest
|
||||
, unexpectedDetailsTest
|
||||
, unexpectedGlobalErrorDetailsTest
|
||||
, unexpectedConfigurationErrorDetailsTest
|
||||
, emptyDetailsTest
|
||||
, wrongLocationTest
|
||||
, underMayNotBeEmptyTest
|
||||
@ -404,6 +405,38 @@ but I found these details:
|
||||
`Some details`"""
|
||||
|
||||
|
||||
unexpectedConfigurationErrorDetailsTest : Test
|
||||
unexpectedConfigurationErrorDetailsTest =
|
||||
test "unexpectedConfigurationErrorDetails" <|
|
||||
\() ->
|
||||
let
|
||||
expectedDetails : List String
|
||||
expectedDetails =
|
||||
[ "Some details" ]
|
||||
|
||||
error : { message : String, details : List String }
|
||||
error =
|
||||
{ message = "Some error"
|
||||
, details = [ "Some other details" ]
|
||||
}
|
||||
in
|
||||
FailureMessage.unexpectedConfigurationErrorDetails expectedDetails error
|
||||
|> expectMessageEqual """
|
||||
\u{001B}[31m\u{001B}[1mUNEXPECTED CONFIGURATION ERROR DETAILS\u{001B}[22m\u{001B}[39m
|
||||
|
||||
I found a configuration error with the following message:
|
||||
|
||||
`Some error`
|
||||
|
||||
and I was expecting its details to be:
|
||||
|
||||
`Some other details`
|
||||
|
||||
but I found these details:
|
||||
|
||||
`Some details`"""
|
||||
|
||||
|
||||
emptyDetailsTest : Test
|
||||
emptyDetailsTest =
|
||||
describe "emptyDetails"
|
||||
|
Loading…
Reference in New Issue
Block a user