Fix Matchers.any specs in Firefox
- Firefox adds whitespace to the resulting to_string function, necessary to remove it for the match to occur correctly.
This commit is contained in:
@@ -947,28 +947,28 @@ describe("jasmine.Matchers", function() {
|
|||||||
describe("with Object", function () {
|
describe("with Object", function () {
|
||||||
it("says it's looking for an object", function () {
|
it("says it's looking for an object", function () {
|
||||||
any = jasmine.any(Object);
|
any = jasmine.any(Object);
|
||||||
expect(any.jasmineToString()).toMatch(/<jasmine\.any\(function Object.*\)>/);
|
expect(any.jasmineToString().replace(/\n/g, "")).toMatch(/<jasmine\.any\(function Object.*\)>/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("with Function", function () {
|
describe("with Function", function () {
|
||||||
it("says it's looking for a function", function () {
|
it("says it's looking for a function", function () {
|
||||||
any = jasmine.any(Function);
|
any = jasmine.any(Function);
|
||||||
expect(any.jasmineToString()).toMatch(/<jasmine\.any\(function Function.*\)>/);
|
expect(any.jasmineToString().replace(/\n/g, "")).toMatch(/<jasmine\.any\(function Function.*\)>/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("with String", function () {
|
describe("with String", function () {
|
||||||
it("says it's looking for a string", function () {
|
it("says it's looking for a string", function () {
|
||||||
any = jasmine.any(String);
|
any = jasmine.any(String);
|
||||||
expect(any.jasmineToString()).toMatch(/<jasmine\.any\(function String.*\)>/);
|
expect(any.jasmineToString().replace(/\n/g, "")).toMatch(/<jasmine\.any\(function String.*\)>/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
describe("with Number", function () {
|
describe("with Number", function () {
|
||||||
it("says it's looking for a number", function () {
|
it("says it's looking for a number", function () {
|
||||||
any = jasmine.any(Number);
|
any = jasmine.any(Number);
|
||||||
expect(any.jasmineToString()).toMatch(/<jasmine\.any\(function Number.*\)>/);
|
expect(any.jasmineToString().replace(/\n/g, "")).toMatch(/<jasmine\.any\(function Number.*\)>/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -976,7 +976,7 @@ describe("jasmine.Matchers", function() {
|
|||||||
it("says it's looking for an object", function () {
|
it("says it's looking for an object", function () {
|
||||||
function MyClass () {}
|
function MyClass () {}
|
||||||
any = jasmine.any(MyClass);
|
any = jasmine.any(MyClass);
|
||||||
expect(any.jasmineToString()).toMatch(/<jasmine\.any\(function MyClass.*\)>/);
|
expect(any.jasmineToString().replace("\n", "")).toMatch(/<jasmine\.any\(function MyClass.*\)>/);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -3,6 +3,6 @@ jasmine.version_= {
|
|||||||
"major": 1,
|
"major": 1,
|
||||||
"minor": 2,
|
"minor": 2,
|
||||||
"build": 0,
|
"build": 0,
|
||||||
"revision": 1333492179,
|
"revision": 1333553033,
|
||||||
"release_candidate": 2
|
"release_candidate": 2
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user