Skip to content

Commit 9fd364e

Browse files
committed
Simple test for computeStackTrace
1 parent f87e0fc commit 9fd364e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

test/raven.test.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,16 @@ describe('TraceKit', function(){
7171
assert.equal(trace.stack[5].func, 'namedFunc4');
7272
});
7373
});
74+
75+
describe('.computeStackTrace', function() {
76+
it('should handle a native error object', function() {
77+
var ex = new Error('test');
78+
var stack = TraceKit.computeStackTrace(ex);
79+
assert.deepEqual(stack.name, 'Error');
80+
assert.deepEqual(stack.message, 'test');
81+
});
82+
});
83+
7484
describe('error notifications', function(){
7585
var testMessage = "__mocha_ignore__";
7686
var subscriptionHandler;

0 commit comments

Comments
 (0)