diff options
author | Simon Lecoq <22963968+lowlighter@users.noreply.github.com> | 2020-10-21 18:53:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-21 18:53:27 +0200 |
commit | 23df1c563efee65e6d549308ed0671a9e2933c05 (patch) | |
tree | 4044912869283f4674467779fab9a56ff2ac3189 /std/testing/README.md | |
parent | 322913ee5c73cd139a46dea593635c2d1a8d5f8c (diff) |
feat(std/testing): Add support for object assertion against object subset (#8001)
This commit add supports for a new assertion function
"assertObjectMatch" which allows to test an actual object
against an expected object subset (i.e. inclusivity, not equality).
Diffstat (limited to 'std/testing/README.md')
-rw-r--r-- | std/testing/README.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/std/testing/README.md b/std/testing/README.md index e442ea014..f970471cb 100644 --- a/std/testing/README.md +++ b/std/testing/README.md @@ -25,6 +25,8 @@ pretty-printed diff of failing assertion. `expected`. - `assertArrayContains()` - Make an assertion that `actual` array contains the `expected` values. +- `assertObjectMatch()` - Make an assertion that `actual` object match + `expected` subset object - `assertThrows()` - Expects the passed `fn` to throw. If `fn` does not throw, this function does. Also compares any errors thrown to an optional expected `Error` class and checks that the error `.message` includes an optional |