@@ -223,22 +223,6 @@ describe('raven.Client', function() {
223
223
done ( ) ;
224
224
} ) ;
225
225
} ) ;
226
-
227
- it ( 'should copy object with extra data instead of using its reference directly' , function ( done ) {
228
- var old = client . send ;
229
- var info = {
230
- extra : {
231
- hello : 'there'
232
- }
233
- } ;
234
- client . send = function mockSend ( kwargs ) {
235
- client . send = old ;
236
- kwargs . extra . should . have . property ( 'hello' , 'there' ) ;
237
- kwargs . extra . should . not . equal ( info ) ;
238
- done ( ) ;
239
- } ;
240
- client . captureMessage ( 'exception' , info ) ;
241
- } ) ;
242
226
} ) ;
243
227
244
228
describe ( '#captureException()' , function ( ) {
@@ -343,12 +327,9 @@ describe('raven.Client', function() {
343
327
var old = zlib . deflate ;
344
328
zlib . deflate = function mockSend ( skwargs ) {
345
329
zlib . deflate = old ;
346
-
347
330
var kwargs = JSON . parse ( skwargs ) ;
348
- // Remove superfluous node version data to simplify the test itself
349
- delete kwargs . extra . node ;
350
- kwargs . should . have . property ( 'extra' , {
351
- foo : '[Circular ~]'
331
+ kwargs . extra . should . have . property ( 'foo' , {
332
+ foo : '[Circular ~.extra.foo]'
352
333
} ) ;
353
334
done ( ) ;
354
335
} ;
@@ -359,7 +340,7 @@ describe('raven.Client', function() {
359
340
foo : null
360
341
}
361
342
} ;
362
- kwargs . extra . foo = kwargs ;
343
+ kwargs . extra . foo = kwargs . extra ;
363
344
client . captureException ( new Error ( 'wtf?' ) , kwargs ) ;
364
345
} ) ;
365
346
@@ -416,45 +397,6 @@ describe('raven.Client', function() {
416
397
}
417
398
) ;
418
399
} ) ;
419
-
420
- it ( 'should copy object with extra data instead of using its reference directly' , function ( done ) {
421
- var old = client . send ;
422
- var info = {
423
- extra : {
424
- hello : 'there'
425
- }
426
- } ;
427
- client . send = function mockSend ( kwargs ) {
428
- client . send = old ;
429
- kwargs . extra . should . have . property ( 'hello' , 'there' ) ;
430
- kwargs . extra . should . not . equal ( info . extra ) ;
431
- done ( ) ;
432
- } ;
433
- client . captureException ( { some : 'exception' } , info ) ;
434
- } ) ;
435
-
436
- it ( 'should preserve same reference to `req` attribute in kwargs' , function ( done ) {
437
- var old = client . process ;
438
- var info = {
439
- extra : {
440
- hello : 'there'
441
- } ,
442
- req : {
443
- something : 'else'
444
- }
445
- } ;
446
- // Use `process` instead of `send` as `req` is stripped from the final payload
447
- client . process = function mockProcess ( id , kwargs ) {
448
- client . process = old ;
449
- kwargs . extra . should . have . property ( 'hello' , 'there' ) ;
450
- kwargs . extra . should . not . equal ( info . extra ) ;
451
-
452
- kwargs . req . should . have . property ( 'something' , 'else' ) ;
453
- kwargs . req . should . equal ( info . req ) ;
454
- done ( ) ;
455
- } ;
456
- client . captureException ( { some : 'exception' } , info ) ;
457
- } ) ;
458
400
} ) ;
459
401
460
402
describe ( '#install()' , function ( ) {
0 commit comments