Skip to content

Commit 17354d7

Browse files
committed
Fix tests to account for reversed stack trace (#64)
1 parent a82d153 commit 17354d7

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/raven.client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -192,13 +192,13 @@ describe('raven.Client', function(){
192192

193193
it('should send a plain text "error" with a synthesized stack', function(done){
194194
var old = client.send;
195-
client.send = function(kwargs) {
195+
client.send = function mockSend(kwargs) {
196196
client.send = old;
197197

198198
kwargs['message'].should.equal("Error: wtf?");
199199
kwargs.should.have.property('sentry.interfaces.Stacktrace');
200200
var stack = kwargs['sentry.interfaces.Stacktrace'];
201-
stack.frames[0]['function'].should.equal('captureError');
201+
stack.frames[stack.frames.length-1]['function'].should.equal('Client.captureError');
202202
done();
203203
};
204204
client.captureError('wtf?');

0 commit comments

Comments
 (0)