Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.01 KB

options.md

File metadata and controls

26 lines (20 loc) · 1.01 KB

Options

All verify() methods take an optional options parameter to configure reporters, scrubbers, file extensions, etc. See the Options diagram for more details.

Chain the options you need onto Options():

verify(
    "Hello, World!",
    options=Options()
    .with_scrubber(lambda text: text.replace("World", "Approvals"))
    .for_file.with_extension(".md"),
)

snippet source | anchor

Inline Approvals

Known Issues

  • Pycharm automatically removes trailing whitespace, which can cause the approval file to be different from the actual output.
    • To disable this behavior go to:
    • File -> Settings -> Editor -> General -> On Save -> [ ] Remove trailing spaces