@@ -53,7 +53,7 @@ describe('serialize()', () => {
5353 expect ( serialize ( obj ) ) . toEqual (
5454 JSON . stringify ( {
5555 name : 'Alice' ,
56- child : { name : 'Bob' , self : '[Circular ~.child ]' } ,
56+ child : { name : 'Bob' , self : '[Circular ~]' } ,
5757 } ) ,
5858 ) ;
5959 } ) ;
@@ -65,7 +65,7 @@ describe('serialize()', () => {
6565 expect ( serialize ( obj ) ) . toEqual (
6666 JSON . stringify ( {
6767 name : 'Alice' ,
68- child : { name : 'Bob' , identity : { self : '[Circular ~.child ]' } } ,
68+ child : { name : 'Bob' , identity : { self : '[Circular ~]' } } ,
6969 } ) ,
7070 ) ;
7171 } ) ;
@@ -94,10 +94,7 @@ describe('serialize()', () => {
9494 expect ( serialize ( obj ) ) . toEqual (
9595 JSON . stringify ( {
9696 name : 'Alice' ,
97- children : [
98- { name : 'Bob' , self : '[Circular ~.children.0]' } ,
99- { name : 'Eve' , self : '[Circular ~.children.1]' } ,
100- ] ,
97+ children : [ { name : 'Bob' , self : '[Circular ~]' } , { name : 'Eve' , self : '[Circular ~]' } ] ,
10198 } ) ,
10299 ) ;
103100 } ) ;
@@ -310,7 +307,7 @@ describe('safeNormalize()', () => {
310307 obj . child . self = obj . child ;
311308 expect ( safeNormalize ( obj ) ) . toEqual ( {
312309 name : 'Alice' ,
313- child : { name : 'Bob' , self : '[Circular ~.child ]' } ,
310+ child : { name : 'Bob' , self : '[Circular ~]' } ,
314311 } ) ;
315312 } ) ;
316313
@@ -320,7 +317,7 @@ describe('safeNormalize()', () => {
320317 obj . child . identity = { self : obj . child } ;
321318 expect ( safeNormalize ( obj ) ) . toEqual ( {
322319 name : 'Alice' ,
323- child : { name : 'Bob' , identity : { self : '[Circular ~.child ]' } } ,
320+ child : { name : 'Bob' , identity : { self : '[Circular ~]' } } ,
324321 } ) ;
325322 } ) ;
326323
@@ -345,7 +342,7 @@ describe('safeNormalize()', () => {
345342 obj . children [ 1 ] . self = obj . children [ 1 ] ;
346343 expect ( safeNormalize ( obj ) ) . toEqual ( {
347344 name : 'Alice' ,
348- children : [ { name : 'Bob' , self : '[Circular ~.children.0 ]' } , { name : 'Eve' , self : '[Circular ~.children.1 ]' } ] ,
345+ children : [ { name : 'Bob' , self : '[Circular ~]' } , { name : 'Eve' , self : '[Circular ~]' } ] ,
349346 } ) ;
350347 } ) ;
351348
0 commit comments