継承されたメソッドが呼び出されたことをJasmineでテストするための最良の方法は何ですか?
基本クラスに単体テストを設定しているので、呼び出されたかどうかのテストにのみ興味があります。
例は次のとおりです。
YUI().use('node', function (Y) {
function ObjectOne () {
}
ObjectOne.prototype.methodOne = function () {
console.log("parent method");
}
function ObjectTwo () {
ObjectTwo.superclass.constructor.apply(this, arguments);
}
Y.extend(ObjectTwo, ObjectOne);
ObjectTwo.prototype.methodOne = function () {
console.log("child method");
ObjectTwo.superclass.methodOne.apply(this, arguments);
}
})
ObjectTwoの継承されたmethodOneが呼び出されたことをテストしたいと思います。
前もって感謝します。