diff --git a/tests/Review/Test/FailureMessageTest.elm b/tests/Review/Test/FailureMessageTest.elm index 6c5989c4..cf6447b5 100644 --- a/tests/Review/Test/FailureMessageTest.elm +++ b/tests/Review/Test/FailureMessageTest.elm @@ -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"