Skip to content
Permalink
Browse files

Update doc matchers json (#924)

* 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 8fb819de5c17a69c4c0d9b17614927a11ec2e07e
Showing with 7 additions and 0 deletions.
  1. +7 −0 doc/matchers.md
@@ -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 |

0 comments on commit 8fb819d

Please sign in to comment.
You can’t perform that action at this time.