Protect against a FF bug: Exceptions don't always have a message property even though they were instantiated with one. Using Error#toString alleviates this
This commit is contained in:
@@ -6,6 +6,13 @@ describe("Spec", function() {
|
||||
expect(jasmine.Spec.isPendingSpecException(e)).toBe(true);
|
||||
});
|
||||
|
||||
it("#isPendingSpecException returns true for a pending spec exception (protect against FF bug)", function() {
|
||||
var e = new Error(jasmine.Spec.pendingSpecExceptionMessage);
|
||||
delete e.message;
|
||||
|
||||
expect(jasmine.Spec.isPendingSpecException(e)).toBe(true);
|
||||
});
|
||||
|
||||
it("#isPendingSpecException returns true for a pending spec exception", function() {
|
||||
var e = new Error("foo");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user