I\'m testing a function that takes a date as an optional argument. I want to assert that a new Date object is created if the function is called without the argument.
from jasmine example,
jasmine.clock().install(); var baseTime = new Date(2013, 9, 23); jasmine.clock().mockDate(baseTime); jasmine.clock().tick(50) expect(new Date().getTime()).toEqual(baseTime.getTime() + 50); afterEach(function () { jasmine.clock().uninstall(); });
jasmine date