Search
Preparing search index...
The search index is not available
DefinitelyTyped
Inherited
Private
Externals
Only exported
SinonExpectation
Interface SinonExpectation
Hierarchy
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
atLeast
atMost
callArg
callArgOn
callArgOnWith
callArgWith
calledAfter
calledBefore
calledOn
calledWith
calledWithExactly
calledWithMatch
calledWithNew
callsArg
callsArgAsync
callsArgOn
callsArgOnAsync
callsArgOnWith
callsArgOnWithAsync
callsArgWith
callsArgWithAsync
exactly
getCall
invokeCallback
never
neverCalledWith
neverCalledWithMatch
notCalledWith
notCalledWithMatch
on
onCall
onFirstCall
onSecondCall
onThirdCall
once
printf
reset
resetBehavior
restore
returned
returns
returnsArg
threw
thrice
throws
twice
verify
withArgs
withExactArgs
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
atLeast
(
n
:
number
)
:
SinonExpectation
Parameters
n:
number
Returns
SinonExpectation
public
atMost
(
n
:
number
)
:
SinonExpectation
Parameters
n:
number
Returns
SinonExpectation
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
exactly
(
n
:
number
)
:
SinonExpectation
Parameters
n:
number
Returns
SinonExpectation
public
getCall
(
n
:
number
)
:
SinonSpyCall
Parameters
n:
number
Returns
SinonSpyCall
public
invokeCallback
(
args
?:
Array<any>
)
Parameters
args?:
Array<any>
optional
public
never
(
)
:
SinonExpectation
Returns
SinonExpectation
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
on
(
obj
:
any
)
:
SinonExpectation
Parameters
obj:
any
Returns
SinonExpectation
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
once
(
)
:
SinonExpectation
Returns
SinonExpectation
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
thrice
(
)
:
SinonExpectation
Returns
SinonExpectation
public
throws
(
type
?:
string
)
:
SinonStub
Parameters
type?:
string
optional
Returns
SinonStub
public
throws
(
obj
:
any
)
:
SinonStub
Parameters
obj:
any
Returns
SinonStub
public
twice
(
)
:
SinonExpectation
Returns
SinonExpectation
public
verify
(
)
:
SinonExpectation
Returns
SinonExpectation
public
withArgs
(
args
?:
Array<any>
)
:
SinonExpectation
Parameters
args?:
Array<any>
optional
Returns
SinonExpectation
public
withExactArgs
(
args
?:
Array<any>
)
:
SinonExpectation
Parameters
args?:
Array<any>
optional
Returns
SinonExpectation
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