@@ -223,22 +223,6 @@ describe('raven.Client', function() {
223223 done ( ) ;
224224 } ) ;
225225 } ) ;
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- } ) ;
242226 } ) ;
243227
244228 describe ( '#captureException()' , function ( ) {
@@ -343,12 +327,9 @@ describe('raven.Client', function() {
343327 var old = zlib . deflate ;
344328 zlib . deflate = function mockSend ( skwargs ) {
345329 zlib . deflate = old ;
346-
347330 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]'
352333 } ) ;
353334 done ( ) ;
354335 } ;
@@ -359,7 +340,7 @@ describe('raven.Client', function() {
359340 foo : null
360341 }
361342 } ;
362- kwargs . extra . foo = kwargs ;
343+ kwargs . extra . foo = kwargs . extra ;
363344 client . captureException ( new Error ( 'wtf?' ) , kwargs ) ;
364345 } ) ;
365346
@@ -416,45 +397,6 @@ describe('raven.Client', function() {
416397 }
417398 ) ;
418399 } ) ;
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- } ) ;
458400 } ) ;
459401
460402 describe ( '#install()' , function ( ) {
0 commit comments