Merge branch 'print_exception_properties' of https://github.com/jbunton-atlassian/jasmine into jbunton-atlassian-print_exception_properties
- Merges #1516 from @jbunton-atlassian
This commit is contained in:
@@ -116,5 +116,16 @@ describe("ExceptionFormatter", function() {
|
||||
it("returns null if no Error provided", function() {
|
||||
expect(new jasmineUnderTest.ExceptionFormatter().stack()).toBeNull();
|
||||
});
|
||||
|
||||
it("includes error properties in stack", function() {
|
||||
var error;
|
||||
try { throw new Error("an error") } catch(e) { error = e; }
|
||||
error.someProperty = 'hello there';
|
||||
|
||||
var result = new jasmineUnderTest.ExceptionFormatter().stack(error);
|
||||
|
||||
expect(result).toMatch(/error properties:.*someProperty.*hello there/);
|
||||
});
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user