Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
SinonStub
Interface SinonStub
Hierarchy
SinonSpy
SinonStub
SinonExpectation
Index
Call signatures
Properties
args
callCount
called
calledOnce
calledThrice
calledTwice
exception
exceptions
firstCall
lastCall
notCalled
returnValue
returnValues
secondCall
thirdCall
thisValue
thisValues
Methods
alwaysCalledOn
alwaysCalledWith
alwaysCalledWithExactly
alwaysCalledWithMatch
alwaysReturned
alwaysThrew
callArg
callArgOn
callArgOnWith
callArgWith
calledAfter
calledBefore
calledOn
calledWith
calledWithExactly
calledWithMatch
calledWithNew
callsArg
callsArgAsync
callsArgOn
callsArgOnAsync
callsArgOnWith
callsArgOnWithAsync
callsArgWith
callsArgWithAsync
getCall
invokeCallback
neverCalledWith
neverCalledWithMatch
notCalledWith
notCalledWithMatch
onCall
onFirstCall
onSecondCall
onThirdCall
printf
reset
resetBehavior
restore
returned
returns
returnsArg
threw
throws
withArgs
yield
yieldOn
yieldTo
yieldToOn
yields
yieldsAsync
yieldsOn
yieldsOnAsync
yieldsTo
yieldsToAsync
yieldsToOn
yieldsToOnAsync
Call signatures
(
args
?:
Array<any>
)
:
any
Parameters
args?:
Array<any>
optional
Returns
any
Properties
public
args
:
Array<any[]>
public
callCount
:
number
public
called
:
boolean
public
calledOnce
:
boolean
public
calledThrice
:
boolean
public
calledTwice
:
boolean
public
exception
:
any
public
exceptions
:
Array<any>
public
firstCall
:
SinonSpyCall
public
lastCall
:
SinonSpyCall
public
notCalled
:
boolean
public
returnValue
:
any
public
returnValues
:
Array<any>
public
secondCall
:
SinonSpyCall
public
thirdCall
:
SinonSpyCall
public
thisValue
:
any
public
thisValues
:
Array<any>
Methods
public
alwaysCalledOn
(
obj
:
any
)
:
boolean
Parameters
obj:
any
Returns
boolean
public
alwaysCalledWith
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
alwaysCalledWithExactly
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
alwaysCalledWithMatch
(
args
?:
SinonMatcher
[]
)
:
boolean
Parameters
args?:
SinonMatcher
[]
optional
Returns
boolean
public
alwaysReturned
(
)
:
boolean
Returns
boolean
public
alwaysThrew
(
)
:
boolean
Returns
boolean
public
alwaysThrew
(
type
:
string
)
:
boolean
Parameters
type:
string
Returns
boolean
public
alwaysThrew
(
obj
:
any
)
:
boolean
Parameters
obj:
any
Returns
boolean
public
callArg
(
pos
:
number
)
Parameters
pos:
number
public
callArgOn
(
pos
:
number
, obj
:
any
, args
?:
Array<any>
)
Parameters
pos:
number
obj:
any
args?:
Array<any>
optional
public
callArgOnWith
(
pos
:
number
, obj
:
any
, args
?:
Array<any>
)
Parameters
pos:
number
obj:
any
args?:
Array<any>
optional
public
callArgWith
(
pos
:
number
, args
?:
Array<any>
)
Parameters
pos:
number
args?:
Array<any>
optional
public
calledAfter
(
anotherSpy
:
SinonSpy
)
:
boolean
Parameters
anotherSpy:
SinonSpy
Returns
boolean
public
calledBefore
(
anotherSpy
:
SinonSpy
)
:
boolean
Parameters
anotherSpy:
SinonSpy
Returns
boolean
public
calledOn
(
obj
:
any
)
:
boolean
Parameters
obj:
any
Returns
boolean
public
calledWith
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
calledWithExactly
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
calledWithMatch
(
args
?:
SinonMatcher
[]
)
:
boolean
Parameters
args?:
SinonMatcher
[]
optional
Returns
boolean
public
calledWithNew
(
spy
:
SinonSpy
)
:
boolean
Parameters
spy:
SinonSpy
Returns
boolean
public
callsArg
(
index
:
number
)
:
SinonStub
Parameters
index:
number
Returns
SinonStub
public
callsArgAsync
(
index
:
number
)
:
SinonStub
Parameters
index:
number
Returns
SinonStub
public
callsArgOn
(
index
:
number
, context
:
any
)
:
SinonStub
Parameters
index:
number
context:
any
Returns
SinonStub
public
callsArgOnAsync
(
index
:
number
, context
:
any
)
:
SinonStub
Parameters
index:
number
context:
any
Returns
SinonStub
public
callsArgOnWith
(
index
:
number
, context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
index:
number
context:
any
args?:
Array<any>
optional
Returns
SinonStub
public
callsArgOnWithAsync
(
index
:
number
, context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
index:
number
context:
any
args?:
Array<any>
optional
Returns
SinonStub
public
callsArgWith
(
index
:
number
, args
?:
Array<any>
)
:
SinonStub
Parameters
index:
number
args?:
Array<any>
optional
Returns
SinonStub
public
callsArgWithAsync
(
index
:
number
, args
?:
Array<any>
)
:
SinonStub
Parameters
index:
number
args?:
Array<any>
optional
Returns
SinonStub
public
getCall
(
n
:
number
)
:
SinonSpyCall
Parameters
n:
number
Returns
SinonSpyCall
public
invokeCallback
(
args
?:
Array<any>
)
Parameters
args?:
Array<any>
optional
public
neverCalledWith
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
neverCalledWithMatch
(
args
?:
SinonMatcher
[]
)
:
boolean
Parameters
args?:
SinonMatcher
[]
optional
Returns
boolean
public
notCalledWith
(
args
?:
Array<any>
)
:
boolean
Parameters
args?:
Array<any>
optional
Returns
boolean
public
notCalledWithMatch
(
args
?:
SinonMatcher
[]
)
:
boolean
Parameters
args?:
SinonMatcher
[]
optional
Returns
boolean
public
onCall
(
n
:
number
)
:
SinonStub
Parameters
n:
number
Returns
SinonStub
public
onFirstCall
(
)
:
SinonStub
Returns
SinonStub
public
onSecondCall
(
)
:
SinonStub
Returns
SinonStub
public
onThirdCall
(
)
:
SinonStub
Returns
SinonStub
public
printf
(
format
:
string
, args
?:
Array<any>
)
:
string
Parameters
format:
string
args?:
Array<any>
optional
Returns
string
public
reset
(
)
public
resetBehavior
(
)
public
restore
(
)
public
returned
(
value
:
any
)
:
boolean
Parameters
value:
any
Returns
boolean
public
returns
(
obj
:
any
)
:
SinonStub
Parameters
obj:
any
Returns
SinonStub
public
returnsArg
(
index
:
number
)
:
SinonStub
Parameters
index:
number
Returns
SinonStub
public
threw
(
)
:
boolean
Returns
boolean
public
threw
(
type
:
string
)
:
boolean
Parameters
type:
string
Returns
boolean
public
threw
(
obj
:
any
)
:
boolean
Parameters
obj:
any
Returns
boolean
public
throws
(
type
?:
string
)
:
SinonStub
Parameters
type?:
string
optional
Returns
SinonStub
public
throws
(
obj
:
any
)
:
SinonStub
Parameters
obj:
any
Returns
SinonStub
public
withArgs
(
args
?:
Array<any>
)
:
SinonStub
Parameters
args?:
Array<any>
optional
Returns
SinonStub
public
yield
(
args
?:
Array<any>
)
Parameters
args?:
Array<any>
optional
public
yieldOn
(
obj
:
any
, args
?:
Array<any>
)
Parameters
obj:
any
args?:
Array<any>
optional
public
yieldTo
(
property
:
string
, args
?:
Array<any>
)
Parameters
property:
string
args?:
Array<any>
optional
public
yieldToOn
(
property
:
string
, obj
:
any
, args
?:
Array<any>
)
Parameters
property:
string
obj:
any
args?:
Array<any>
optional
public
yields
(
args
?:
Array<any>
)
:
SinonStub
Parameters
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsAsync
(
args
?:
Array<any>
)
:
SinonStub
Parameters
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsOn
(
context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
context:
any
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsOnAsync
(
context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
context:
any
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsTo
(
property
:
string
, args
?:
Array<any>
)
:
SinonStub
Parameters
property:
string
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsToAsync
(
property
:
string
, args
?:
Array<any>
)
:
SinonStub
Parameters
property:
string
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsToOn
(
property
:
string
, context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
property:
string
context:
any
args?:
Array<any>
optional
Returns
SinonStub
public
yieldsToOnAsync
(
property
:
string
, context
:
any
, args
?:
Array<any>
)
:
SinonStub
Parameters
property:
string
context:
any
args?:
Array<any>
optional
Returns
SinonStub
Globals
sinon