From bef65df2e6da468c1a684ba72cd64ea94e248d93 Mon Sep 17 00:00:00 2001 From: georgejecook <george@tantawowa.com> Date: Wed, 4 Oct 2023 09:55:31 +0100 Subject: [PATCH] minor doc fix --- docs/index.md | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/index.md b/docs/index.md index 1ebd54ae..9499ed7a 100644 --- a/docs/index.md +++ b/docs/index.md @@ -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: