Merge pull request #358 from sheelc/safari_exception_fix

Fix spec to throw error, ensuring a stack property
This commit is contained in:
Davis W. Frank
2013-06-07 07:37:39 -07:00

View File

@@ -41,7 +41,8 @@ describe("ExceptionFormatter", function() {
describe("#stack", 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+/)
});