Skip to content

Commit

Permalink
fix: throw AssertionError instead of Error in case of approval failure
Browse files Browse the repository at this point in the history
  • Loading branch information
nicerloop committed Dec 4, 2024
1 parent 8dcd1dd commit 4f42a56
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ private static void verifyEachFileAgainstMasterDirectory(File[] files, Options o
if (!mismatched.isEmpty())
{
String message = "The Following Files did not match up: " + getFileNameList(mismatched);
throw new Error(message);
throw new AssertionError(message);
}
}
private static String getFileNameList(List<File> mismatched)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public VerifyResult reportFailure(ApprovalFailureReporter reporter)
}
public void fail()
{
throw new Error(String.format("Failed Approval\n Approved:%s\n Received:%s", approved.getAbsolutePath(),
throw new AssertionError(String.format("Failed Approval\n Approved:%s\n Received:%s", approved.getAbsolutePath(),
received.getAbsolutePath()));
}
public static VerifyResult approveTextFile(File received, File approved)
Expand Down

0 comments on commit 4f42a56

Please sign in to comment.