Don't report error when details are the same

This commit is contained in:
Jeroen Engels 2021-03-09 23:28:12 +01:00
parent 842f07b889
commit 3e884c8754
2 changed files with 5 additions and 2 deletions

View File

@ -1482,5 +1482,8 @@ expectConfigurationErrorDetailsMatch expectedError configurationError =
if expectedError.message /= configurationError.message then
Expect.fail (FailureMessage.messageMismatchForConfigurationError expectedError configurationError)
else if expectedError.details /= configurationError.details then
Expect.fail (FailureMessage.unexpectedConfigurationErrorDetails expectedError.details configurationError)
else
Expect.fail (FailureMessage.unexpectedGlobalErrorDetails expectedError.details configurationError)
Expect.pass

View File

@ -4,7 +4,7 @@ module Review.Test.FailureMessage exposing
, underMismatch, expectedMoreErrors, tooManyErrors, locationNotFound, underMayNotBeEmpty, locationIsAmbiguousInSourceCode
, needToUsedExpectErrorsForModules, missingSources, duplicateModuleName, unknownModulesInExpectedErrors
, missingFixes, unexpectedFixes, fixedCodeMismatch, unchangedSourceAfterFix, invalidSourceAfterFix, hasCollisionsInFixRanges
, didNotExpectGlobalErrors, expectedMoreGlobalErrors, fixedCodeWhitespaceMismatch, messageMismatchForConfigurationError, messageMismatchForGlobalError, missingConfigurationError, tooManyGlobalErrors, unexpectedConfigurationError, unexpectedGlobalErrorDetails
, didNotExpectGlobalErrors, expectedMoreGlobalErrors, fixedCodeWhitespaceMismatch, messageMismatchForConfigurationError, messageMismatchForGlobalError, missingConfigurationError, tooManyGlobalErrors, unexpectedConfigurationError, unexpectedConfigurationErrorDetails, unexpectedGlobalErrorDetails
)
{-| Failure messages for the `Review.Test` module.