Closed claremacrae closed 4 years ago
Also, the use of Approvals::verify()
in the first block of code in the example above gives an extra blank line in the approved file, so differing from the file written out by the function being tested - as reported in #50
This is fixed and is about to be released in v.10.1.0
For my talks on ApprovalTests, I have some example code that uses a custom
ApprovalWriter
to remove date-and-time values from a log file.I tried updating it to use a Scrubber instead, and because
verifyExistingFile()
doesn't use any supplied scrubber, it turned out to be moderately complicated code:It would be great to be able to remove the readFile step, and do this instead: