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;
|
message += error.message || error;
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSpec.addExpectationResult(false, {
|
currentRunnable().addExpectationResult(false, {
|
||||||
matcherName: '',
|
matcherName: '',
|
||||||
passed: false,
|
passed: false,
|
||||||
expected: '',
|
expected: '',
|
||||||
@@ -1490,6 +1490,7 @@ getJasmineRequireObj().MockDate = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createDateProperties() {
|
function createDateProperties() {
|
||||||
|
FakeDate.prototype = GlobalDate.prototype;
|
||||||
|
|
||||||
FakeDate.now = function() {
|
FakeDate.now = function() {
|
||||||
if (GlobalDate.now) {
|
if (GlobalDate.now) {
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ describe("FakeDate", function() {
|
|||||||
|
|
||||||
mockDate.install();
|
mockDate.install();
|
||||||
expect(new fakeGlobal.Date()).toEqual(jasmine.any(Date));
|
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() {
|
it("fakes current time when using Date.now()", function() {
|
||||||
|
|||||||
@@ -61,6 +61,7 @@ getJasmineRequireObj().MockDate = function() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function createDateProperties() {
|
function createDateProperties() {
|
||||||
|
FakeDate.prototype = GlobalDate.prototype;
|
||||||
|
|
||||||
FakeDate.now = function() {
|
FakeDate.now = function() {
|
||||||
if (GlobalDate.now) {
|
if (GlobalDate.now) {
|
||||||
|
|||||||
Reference in New Issue
Block a user