Merge pull request #358 from sheelc/safari_exception_fix
Fix spec to throw error, ensuring a stack property
This commit is contained in:
@@ -41,7 +41,8 @@ describe("ExceptionFormatter", function() {
|
|||||||
|
|
||||||
describe("#stack", function() {
|
describe("#stack", function() {
|
||||||
it("formats stack traces from Webkit, Firefox or node.js", function() {
|
it("formats stack traces from Webkit, Firefox or node.js", function() {
|
||||||
var error = new Error("an error");
|
var error;
|
||||||
|
try { throw new Error("an error") } catch(e) { error = e; };
|
||||||
expect(new j$.ExceptionFormatter().stack(error)).toMatch(/ExceptionFormatterSpec\.js.*\d+/)
|
expect(new j$.ExceptionFormatter().stack(error)).toMatch(/ExceptionFormatterSpec\.js.*\d+/)
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user