Merge branch 'master' of https://github.com/chernetsov/jasmine into chernetsov-master
Fix #678 Close #679
This commit is contained in:
@@ -821,7 +821,7 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
message += error.message || error;
|
||||
}
|
||||
|
||||
currentSpec.addExpectationResult(false, {
|
||||
currentRunnable().addExpectationResult(false, {
|
||||
matcherName: '',
|
||||
passed: false,
|
||||
expected: '',
|
||||
@@ -1490,6 +1490,7 @@ getJasmineRequireObj().MockDate = function() {
|
||||
}
|
||||
|
||||
function createDateProperties() {
|
||||
FakeDate.prototype = GlobalDate.prototype;
|
||||
|
||||
FakeDate.now = function() {
|
||||
if (GlobalDate.now) {
|
||||
|
||||
@@ -389,7 +389,7 @@ describe("Clock (acceptance)", function() {
|
||||
|
||||
clock.tick(6);
|
||||
expect(delayedFn1).toHaveBeenCalled();
|
||||
expect(delayedFn2).toHaveBeenCalled();
|
||||
expect(delayedFn2).toHaveBeenCalled();
|
||||
});
|
||||
|
||||
it("does not mock the Date object by default", function() {
|
||||
|
||||
@@ -75,6 +75,7 @@ describe("FakeDate", function() {
|
||||
|
||||
mockDate.install();
|
||||
expect(new fakeGlobal.Date()).toEqual(jasmine.any(Date));
|
||||
expect(new fakeGlobal.Date() instanceof fakeGlobal.Date).toBe(true);
|
||||
});
|
||||
|
||||
it("fakes current time when using Date.now()", function() {
|
||||
|
||||
@@ -61,6 +61,7 @@ getJasmineRequireObj().MockDate = function() {
|
||||
}
|
||||
|
||||
function createDateProperties() {
|
||||
FakeDate.prototype = GlobalDate.prototype;
|
||||
|
||||
FakeDate.now = function() {
|
||||
if (GlobalDate.now) {
|
||||
|
||||
Reference in New Issue
Block a user