Skip to content

Commit

Permalink
docs: document matchingSavedSnapshot() method
Browse files Browse the repository at this point in the history
  • Loading branch information
murdos committed Sep 17, 2024
1 parent de991c9 commit aeffff1
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ private void assertFileExists() {
assertThat(Files.exists(path)).as(fileNotFoundMessage(path, projectFolder)).isTrue();
}

/**
* Verifies that the file content matches the saved snapshot, using ApprovalTests.
*/
public JHipsterModuleFileAsserter<T> matchingSavedSnapshot() {
String shortFileName = Arrays.stream(file.split("/")).toList().getLast();
ApprovalFailureReporter reporter = new FirstWorkingReporter(new AutoApproveWhenEmptyReporter(), new DiffReporter());
Expand Down

0 comments on commit aeffff1

Please sign in to comment.