sinon/spy.js

依存関係

継承

非公開メソッド

sinon.spyCall
throwYieldError(proxy, text, args)

公開メソッド

sinon.spy(object, property)
sinon.spy.reset()
sinon.spy.create(func)
sinon.spy.invoke(func, thisValue, args)
sinon.spy.getCall(i)
sinon.spy.calledBefore(spyFn)
sinon.spy.calledAfter(spyFn)
sinon.spy.withArgs()
sinon.spy.matches(args, strict)
sinon.spy.printf(format)
sinon.spy.alwaysCalledOn()

sinon.spy.spyCall.calledOnを呼び出す。

sinon.spy.alwaysCalledWith()

sinon.spy.spyCall.calledWithを呼び出す。

sinon.spy.alwaysCalledWithExactly()

sinon.spy.spyCall.calledWithExactlyを呼び出す。

sinon.spy.alwaysCalledWithMatch()

sinon.spy.spyCall.calledWithMatchを呼び出す。

sinon.spy.alwaysCalledWithNew()

sinon.spy.spyCall.calledWithNewを呼び出す。

sinon.spy.alwaysReturned()

sinon.spy.spyCall.returnedを呼び出す。

sinon.spy.alwaysThrew()

sinon.spy.spyCall.threwを呼び出す。

sinon.spy.callArg()

sinon.spy.spyCall.callArgWithを呼び出す。

sinon.spy.callArgWith()

sinon.spy.callArgを呼び出す。

sinon.spy.calledOn()

sinon.spy.spyCall.calledOnを呼び出す。

sinon.spy.calledWith()

sinon.spy.spyCall.calledWithを呼び出す。

sinon.spy.calledWithExactly()

sinon.spy.spyCall.calledWithExactlyを呼び出す。

sinon.spy.calledWithMatch()

sinon.spy.spyCall.calledWithMatchを呼び出す。

sinon.spy.calledWithNew()

sinon.spy.spyCall.calledWithNewを呼び出す。

sinon.spy.formatters
sinon.spy.formatters.c(spy)
sinon.spy.formatters.n(spy)
sinon.spy.formatters.C(spy)
sinon.spy.formatters.t(spy)
sinon.spy.formatters.asterisk(spy, args)

asterisk === *

sinon.spy.invokeCallback()

sinon.spy.yieldを呼び出す。

sinon.spy.neverCalledWith()

sinon.spy.spyCall.notCalledWithを呼び出す。

sinon.spy.neverCalledWithMatch()

sinon.spy.spyCall.notCalledWithMatchを呼び出す。

sinon.spy.returned()

sinon.spy.spyCall.returnedを呼び出す。

sinon.spy.spyCall

sinon.spyCallと同一オブジェクト

sinon.spy.threw

sinon.spy.spyCall.threwを呼び出す。

sinon.spy.yield

sinon.spy.spyCall.yieldを呼び出す。

sinon.spy.yieldTo

sinon.spy.spyCall.yieldToを呼び出す。

プロパティ

sinon.spyCall
sinon.spyCall.create(spy, thisValue, args, returnValue, exception, id)
sinon.spyCall.calledOn(thisValue)
sinon.spyCall.calledWith()
sinon.spyCall.calledWithMatch()
sinon.spyCall.calledWithExactly()
sinon.spyCall.notCalledWith()
sinon.spyCall.notCalledWithMatch()
sinon.spyCall.returned(value)
sinon.spyCall.threw(error)
sinon.spyCall.calledWithNew(thisValue)
sinon.spyCall.calledBefore(other)
sinon.spyCall.calledAfter(other)
sinon.spyCall.callArg(pos)
sinon.spyCall.callArgWith(pos)
sinon.spyCall.yield()
sinon.spyCall.yieldTo(prop)
sinon.spyCall.toString()