@@ -15,7 +15,9 @@ describe('formatComplexDataStructure', () => {
1515 it ( 'should format an object' , ( ) => {
1616 const fixture = { a : 1 , b : { c : 'ccc' } } ;
1717
18- expect ( formatComplexDataStructure ( fixture , false , 0 , options ) ) . toEqual (
18+ expect (
19+ formatComplexDataStructure ( fixture , 'foo' , false , 0 , options )
20+ ) . toEqual (
1921 `{
2022 a: 1,
2123 b: {
@@ -28,19 +30,23 @@ describe('formatComplexDataStructure', () => {
2830 it ( 'should format inline an object' , ( ) => {
2931 const fixture = { a : 1 , b : { c : 'ccc' } } ;
3032
31- expect ( formatComplexDataStructure ( fixture , true , 0 , options ) ) . toEqual (
32- "{a: 1, b: {c: 'ccc'}}"
33- ) ;
33+ expect (
34+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , options )
35+ ) . toEqual ( "{a: 1, b: {c: 'ccc'}}" ) ;
3436 } ) ;
3537
3638 it ( 'should format an empty object' , ( ) => {
37- expect ( formatComplexDataStructure ( { } , false , 0 , options ) ) . toEqual ( '{}' ) ;
39+ expect ( formatComplexDataStructure ( { } , 'foo' , false , 0 , options ) ) . toEqual (
40+ '{}'
41+ ) ;
3842 } ) ;
3943
4044 it ( 'should order the object keys' , ( ) => {
4145 const fixture = { b : { d : 'ddd' , c : 'ccc' } , a : 1 } ;
4246
43- expect ( formatComplexDataStructure ( fixture , false , 0 , options ) ) . toEqual (
47+ expect (
48+ formatComplexDataStructure ( fixture , 'foo' , false , 0 , options )
49+ ) . toEqual (
4450 `{
4551 a: 1,
4652 b: {
@@ -54,7 +60,9 @@ describe('formatComplexDataStructure', () => {
5460 it ( 'should format an array' , ( ) => {
5561 const fixture = [ 1 , '2' , true , false , null ] ;
5662
57- expect ( formatComplexDataStructure ( fixture , false , 0 , options ) ) . toEqual (
63+ expect (
64+ formatComplexDataStructure ( fixture , 'foo' , false , 0 , options )
65+ ) . toEqual (
5866 `[
5967 1,
6068 '2',
@@ -68,39 +76,43 @@ describe('formatComplexDataStructure', () => {
6876 it ( 'should format inline an array ' , ( ) => {
6977 const fixture = [ 1 , '2' , true , false , null ] ;
7078
71- expect ( formatComplexDataStructure ( fixture , true , 0 , options ) ) . toEqual (
72- "[1 , '2 ', true, false, null]"
73- ) ;
79+ expect (
80+ formatComplexDataStructure ( fixture , 'foo ' , true , 0 , options )
81+ ) . toEqual ( "[1, '2', true, false, null]" ) ;
7482 } ) ;
7583
7684 it ( 'should format an object that contains a react element' , ( ) => {
7785 const fixture = { a : createFakeReactElement ( 'BarBar' ) } ;
7886
79- expect ( formatComplexDataStructure ( fixture , false , 0 , options ) ) . toEqual (
87+ expect (
88+ formatComplexDataStructure ( fixture , 'foo' , false , 0 , options )
89+ ) . toEqual (
8090 `{
8191 a: <BarBar />
8292 }`
8393 ) ;
8494 } ) ;
8595
8696 it ( 'should format an empty array' , ( ) => {
87- expect ( formatComplexDataStructure ( [ ] , false , 0 , options ) ) . toEqual ( '[]' ) ;
97+ expect ( formatComplexDataStructure ( [ ] , 'foo' , false , 0 , options ) ) . toEqual (
98+ '[]'
99+ ) ;
88100 } ) ;
89101
90102 it ( 'should format an object that contains a date' , ( ) => {
91103 const fixture = { a : new Date ( '2017-11-13T00:00:00.000Z' ) } ;
92104
93- expect ( formatComplexDataStructure ( fixture , true , 0 , options ) ) . toEqual (
94- `{a: new Date('2017-11-13T00:00:00.000Z')}`
95- ) ;
105+ expect (
106+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , options )
107+ ) . toEqual ( `{a: new Date('2017-11-13T00:00:00.000Z')}` ) ;
96108 } ) ;
97109
98110 it ( 'should format an object that contains a regexp' , ( ) => {
99111 const fixture = { a : / t e s t / g } ;
100112
101- expect ( formatComplexDataStructure ( fixture , true , 0 , options ) ) . toEqual (
102- `{a: /test/g}`
103- ) ;
113+ expect (
114+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , options )
115+ ) . toEqual ( `{a: /test/g}` ) ;
104116 } ) ;
105117
106118 it ( 'should replace a function with noRefCheck' , ( ) => {
@@ -110,9 +122,9 @@ describe('formatComplexDataStructure', () => {
110122 } ,
111123 } ;
112124
113- expect ( formatComplexDataStructure ( fixture , true , 0 , options ) ) . toEqual (
114- '{a: function noRefCheck() {}}'
115- ) ;
125+ expect (
126+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , options )
127+ ) . toEqual ( '{a: function noRefCheck() {}}' ) ;
116128 } ) ;
117129
118130 it ( 'should format a function' , ( ) => {
@@ -123,7 +135,7 @@ describe('formatComplexDataStructure', () => {
123135 } ;
124136
125137 expect (
126- formatComplexDataStructure ( fixture , true , 0 , {
138+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , {
127139 ...options ,
128140 showFunctions : true ,
129141 } )
@@ -138,7 +150,7 @@ describe('formatComplexDataStructure', () => {
138150 } ;
139151
140152 expect (
141- formatComplexDataStructure ( fixture , true , 0 , {
153+ formatComplexDataStructure ( fixture , 'foo' , true , 0 , {
142154 ...options ,
143155 functionValue : ( ) => '<Test />' ,
144156 } )
0 commit comments