Skip to content

Commit eda3b08

Browse files
committed
. d Describe Custom Comparators
1 parent 2835d14 commit eda3b08

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

approvaltests/docs/reference/Options.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,12 @@ Approvals.verify("text to be verified", new Options().forFile().withExtension(".
5959

6060
**Note:** `withExtension()` returns an `Options` object, so it's possible to keep appending more `with...()` calls.
6161

62+
## Custom Comparators
63+
By default Approval Tests will only check if the `.approved` and `.received` files are _exactly_ matching.
64+
The only accomodations it makes is for differences in line endings.
65+
66+
If you would like to create a more flexible comparison, you can do it by using the `Options.withComparator()` function.
67+
6268
## Defaults
6369

6470
The default constructor for Options does:

0 commit comments

Comments
 (0)