Skip to content

Commit

Permalink
minor doc fix
Browse files Browse the repository at this point in the history
  • Loading branch information
georgejecook committed Oct 4, 2023
1 parent b2eb284 commit bef65df
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -626,11 +626,12 @@ To create a stub, we use the `stubCall` method:
function stubCall(invocation, returnValue = invalid) as object
```

- The target is the object which will have it's method replaced,
- Method name is the name of the method to replace
- expectedInvocations is the number of times we expect the method to be called
- expectedArgs is an array of values we expect the method to be invoked with
- returnValue is the value we wish to return
e.g.

```
m.stubCall(detailsVM.rexecuteNetRequest, returnJson)
```


##### A simple example
Given a ViewModel, named DetailsVM, which has a method LoadDetails, as such:
Expand Down

0 comments on commit bef65df

Please sign in to comment.