sinon/stub.js

依存関係

継承

非公開メソッド

getCallback(stub, args)
getCallbackError(stub, func, args)
callCallback(stub, args)
sinon.stub
throwsException(error, message)

公開メソッド

sinon.stub(object, property, func)
sinon.stub.create()
sinon.stub.returns(value)
sinon.stub.returnsArg(pos)
sinon.stub.returnsThis()
sinon.stub.throws()

非公開メソッド:throwsException を呼び出す。

sinon.stub.throwsException()

非公開メソッド:throwsException を呼び出す。

sinon.stub.callsArg(pos)
sinon.stub.callsArgOn(pos, context)
sinon.stub.callsArgWith(pos)
sinon.stub.callsArgWith(pos, context)
sinon.stub.callsArgAsync(pos)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.callsArgを呼び出す。

sinon.stub.callsArgOnAsync(pos, context)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.callsArgOnを呼び出す。

sinon.stub.callsArgWithAsync(pos)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.callsArgWithを呼び出す。

sinon.stub.callsArgWithAsync(pos, context)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.callsArgWithを呼び出す。

sinon.stub.yields()
sinon.stub.yieldsOn(context)
sinon.stub.yieldsTo(prop)
sinon.stub.yieldsToOn(prop, context)
sinon.stub.yieldsAsync()

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.yieldsを呼び出す。

sinon.stub.yieldsOnAsync(context)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.yieldsOnを呼び出す。

sinon.stub.yieldsToAsync(prop)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.yieldsToを呼び出す。

sinon.stub.yieldsToOnAsync(prop, context)

this.callbackAsync(thisはsinon.stubのインスタンス)にtrueを設定して、sinon.stub.yieldsToOnを呼び出す。

プロパティ