What is the best way to verify with Jasmine that the legacy method has been called?
Iβm only interested in checking if it was called, since I have installed unit tests for the base class.
example:
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); } })
I want to verify that the ObjectTwo inherited method One has been called.
Thanks in advance.
source share