* [Create regex scrubber](#create-regex-scrubber)
Renamed scrub_with_regex
to create_regex_scrubber
.
It can now take either a str
or a Callable[[int], str]
Going forward, functions that return scrubber will start with create
while functions that scrub directly will start with scrub
See Storyboard
BREAKING CHANGE Since most tools will ensure a newline at the end of a file, approval test is now adding this to allow copying approval results in diff tools to work correctly. Please note that this will break all you previous approvals that do not end with a newline!
This will show by your diff tool opening with two files that look identical, but one actually has a newline at the end.
We suggest you use ReporterByCopyMoveCommandForEverythingToClipboard()
as your Default Reporter to re-approve all your files.
Previously if you had nested methods in your unit test, the names would incorrectly identify the help method rather than the test method. This is now fixed.
If you want to set the extension of the approval file, you can now do it through the options.
verify(content, options=Options().for_file.with_extension(".md"))