updateGoldensOnFailure function

void updateGoldensOnFailure()

Sets a static flag that ignores all golden-file failures.

Upon a failure, the file is updated with the new expected contents. This method is considered optional, and the preferred way of automatically updating tests is setting an environment variable:

$ GOLDENROD_UPDATE=true pub run test

Implementation

void updateGoldensOnFailure() {
  internal.updateGoldensOnFailure = true;
}