@@ -10,22 +10,22 @@ Mocking library for TypeScript inspired by http://mockito.org/
10
10
11
11
* Strongly typed
12
12
* IDE autocomplete
13
- * Mock creation (` mock ` ) (also abstract classes)
14
- * Spying on real objects (` spy ` )
13
+ * Mock creation (` mock ` ) (also abstract classes) [ #example ] ( #basics )
14
+ * Spying on real objects (` spy ` ) [ #example ] ( #spying-on-real-objects )
15
15
* Changing mock behavior (` when ` ) via:
16
- * `thenReturn` - return value
17
- * `thenThrow` - throw an error
18
- * `thenCall` - call custom method
19
- * `thenResolve` - resolve promise
20
- * `thenReject` - rejects promise
16
+ * `thenReturn` - return value [#example](#stubbing-method-calls)
17
+ * `thenThrow` - throw an error [#example](#throwing-errors)
18
+ * `thenCall` - call custom method [#example](#custom-function)
19
+ * `thenResolve` - resolve promise [example](#resolving--rejecting-promises)
20
+ * `thenReject` - rejects promise [example](#resolving--rejecting-promises)
21
21
* Checking if methods were called with given arguments (` verify ` )
22
22
* `anything`, `notNull`, `anyString`, `anyOfClass` etc. - for more flexible comparision
23
- * `once`, `twice`, `times`, `atLeast` etc. - allows call count verification
24
- * `calledBefore`, `calledAfter` - allows call order verification
25
- * Resetting mock (` reset ` , ` resetCalls ` )
26
- * Capturing arguments passed to method (` capture ` )
27
- * Recording multiple behaviors
28
- * Readable error messages (ex. 'Expected "convertNumberToString(strictEqual(3))" to be called 2 time(s). But has been called 1 time(s).')
23
+ * `once`, `twice`, `times`, `atLeast` etc. - allows call count verification [#example](#call-count-verification)
24
+ * `calledBefore`, `calledAfter` - allows call order verification [#example](#call-order-verification)
25
+ * Resetting mock (` reset ` , ` resetCalls ` ) [ #example ] ( #resetting-mock-calls ) , [ #example ] ( #resetting-mock )
26
+ * Capturing arguments passed to method (` capture ` ) [ #example ] ( #capturing-method-arguments )
27
+ * Recording multiple behaviors [ #example ] ( #recording-multiple-behaviors )
28
+ * Readable error messages (ex. ` 'Expected "convertNumberToString(strictEqual(3))" to be called 2 time(s). But has been called 1 time(s).' ` )
29
29
30
30
## Installation
31
31
0 commit comments