Skip to content

Commit 15d8360

Browse files
Update README
1 parent 2f1a84f commit 15d8360

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

README.md

+3-1
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ verify(mockedFoo.getBar(_)).called();
186186

187187
### Match by JSON
188188

189+
Matching by JSON works very similar to `objectContaining()`, to be used when the value to match is a string containing a JSON formatted object instead of just an object. This allows to partially match the JSON content.
190+
189191
``` typescript
190192
// Creating mock
191193
let mockedFoo:Foo = mock(Foo);
@@ -228,7 +230,7 @@ let mockedFoo:Foo = mock(Foo);
228230
let foo:Foo = instance(mockedFoo);
229231

230232
// Using instance in source code
231-
foo.bar("racecar);
233+
foo.bar("racecar");
232234

233235
// Match using the custom matcher
234236
verify(mockedFoo.bar(isPalindrome())).once();

package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@johanblumenberg/ts-mockito",
3-
"version": "1.0.44",
3+
"version": "1.0.45",
44
"description": "Mocking library for TypeScript",
55
"main": "lib/ts-mockito.js",
66
"typings": "lib/ts-mockito",

0 commit comments

Comments
 (0)