Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions approvaltests/docs/reference/Options.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@

## Introduction

There are many things you might want to tweak with Approval Tests. `Options` is the entry-point for many of the changes.
It is on all `verify()` methods, as an optional parameter.
ApprovalTests has many `verify...()` functions that need the same optional parameters, of which there are many. Instead of overloading every `verify...()` function in the same way, over and over, we put those options into an `Options` object that all the `verify...()` functions can take as an optional parameter.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (typo): Consider tightening the wording to avoid repetition and improve clarity.

The clause "that need the same optional parameters, of which there are many" is repetitive and a bit awkward. Consider something like "that share a large set of optional parameters" to keep the meaning while tightening the sentence.

Suggested change
ApprovalTests has many `verify...()` functions that need the same optional parameters, of which there are many. Instead of overloading every `verify...()` function in the same way, over and over, we put those options into an `Options` object that all the `verify...()` functions can take as an optional parameter.
ApprovalTests has many `verify...()` functions that share a large set of optional parameters. Instead of overloading every `verify...()` function in the same way, over and over, we put those options into an `Options` object that all the `verify...()` functions can take as an optional parameter.


For example:

snippet: basic_approval_with_file_extension

## Fluent Interface

`Options` utilizes a fluent interface, allowing you to chain together commands. Each returned object is a new copy.
`Options` has a "fluent" interface, allowing you to chain together commands: each returned object is a new copy of `Options` which you can configure further. For example:

<!-- snippet: specify_all_the_options -->
<a id='snippet-specify_all_the_options'></a>
Expand Down
Loading