Skip to content

Commit

Permalink
Update doc matchers json (#924)
Browse files Browse the repository at this point in the history
* Fixed default on write spec failure file

* Add JSON assertions to the doc
  • Loading branch information
jesuswasrasta authored and sksamuel committed Aug 5, 2019
1 parent 3943e3e commit 8fb819d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions doc/matchers.md
Expand Up @@ -61,6 +61,13 @@ For the extension function style, each function has an equivalent negated versio
| `str.shouldStartWith("prefix")` | Asserts that the string starts with the given prefix. The prefix can be equal to the string. This matcher is case sensitive. To make this case insensitive call `toLowerCase()` on the value before the matcher. |
| `str.shouldBeEqualIgnoringCase(other)` | Asserts that the string is equal to another string ignoring case. |

| JSON ||
| -------- | ---- |
| `str.shouldMatchJson(json)` | Asserts that the JSON is equal to another JSON ignoring properties' order and formatting. |
| `str.shouldContainJsonKey("$.key")` | Asserts that the JSON contains a `key`. |
| `str.shouldContainJsonKeyValue("$.key", "value")` | Asserts that the JSON contains a `key` with a specific `value`. |
| `str.shouldMatchJsonResource("/file.json")` | Asserts that the JSON is equal to the existing `/file.json` ignoring properties' order and formatting. |

| Integers ||
| -------- | ---- |
| `int.shouldBeBetween(x, y)` | Asserts that the integer is between x and y, inclusive on both x and y |
Expand Down

0 comments on commit 8fb819d

Please sign in to comment.