From 1e7b7ae366e8e4dcccb2fcd048526021bba7a853 Mon Sep 17 00:00:00 2001 From: Tim Vahlbrock Date: Wed, 17 Apr 2024 09:01:59 +0200 Subject: [PATCH] fix: updated deprecated `eachLike` V3 description. Adapted `eachLike` V3 description as discussed in https://github.com/pact-foundation/pact-js/issues/1207 --- docs/matching.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/matching.md b/docs/matching.md index 20256ab54..4a114b59a 100644 --- a/docs/matching.md +++ b/docs/matching.md @@ -211,7 +211,7 @@ const animalBodyExpectation = { | Matcher | Parameters | Description | | ---------------------- | -------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | `like` | template | Applies the `type` matcher to value, which requires values to have the same type as the template | -| `eachLike` | template | Applies the `type` matcher to each value in an array, ensuring they match the template. Note that this matcher does not validate the length of the array, and the items within it | +| `eachLike` | template, min: number = 1 | | Applies the `type` matcher to each value in an array, ensuring they match the template. Note that this matcher does validate the length of the array to be at least one by default, as the contents of the array might otherwise never be matched. | | `atLeastOneLike` | template, count: number = 1 | Behaves like the `eachLike` matcher, but also applies a minimum length validation of one on the length of the array. The optional `count` parameter controls the number of examples generated. | | `atLeastLike` | template, min: number, count?: number | Just like `atLeastOneLike`, but the minimum length is configurable. | | `atMostLike` | template, max: number, count?: number | Behaves like the `eachLike` matcher, but also applies a maximum length validation on the length of the array. The optional `count` parameter controls the number of examples generated. |