@@ -18,7 +18,7 @@ describe('Build query tree from field', () => {
18
18
args : [ ]
19
19
} ,
20
20
typeDictionary
21
- ) . should . equal ( 'FetchParentField' ) ;
21
+ ) . should . deep . equal ( [ 'FetchParentField' ] ) ;
22
22
} ) ;
23
23
24
24
it ( 'should handle simple objects' , ( ) => {
@@ -32,8 +32,8 @@ describe('Build query tree from field', () => {
32
32
} ,
33
33
typeDictionary , ignoreList
34
34
) ;
35
- result . MyObjectField [ 0 ] . should . equal ( 'MyScalar' ) ;
36
- result . MyObjectField [ 1 ] . should . equal ( 'MyScalar2' ) ;
35
+ result . MyObjectField [ 0 ] . should . deep . equal ( [ 'MyScalar' ] ) ;
36
+ result . MyObjectField [ 1 ] . should . deep . equal ( [ 'MyScalar2' ] ) ;
37
37
ignoreList . length . should . equal ( 1 ) ;
38
38
ignoreList [ 0 ] . should . equal ( 'MyObjectField-ObjectField-ROOT' ) ;
39
39
} ) ;
@@ -50,9 +50,9 @@ describe('Build query tree from field', () => {
50
50
typeDictionary , ignoreList
51
51
) ;
52
52
result . MyObjectWithNested [ 0 ] . should . include . all . keys ( 'NestedObject' ) ;
53
- result . MyObjectWithNested [ 0 ] . NestedObject [ 0 ] . should . equal ( 'MyScalar' ) ;
54
- result . MyObjectWithNested [ 0 ] . NestedObject [ 1 ] . should . equal ( 'MyScalar2' ) ;
55
- result . MyObjectWithNested [ 1 ] . should . equal ( 'NestedScalar' ) ;
53
+ result . MyObjectWithNested [ 0 ] . NestedObject [ 0 ] . should . deep . equal ( [ 'MyScalar' ] ) ;
54
+ result . MyObjectWithNested [ 0 ] . NestedObject [ 1 ] . should . deep . equal ( [ 'MyScalar2' ] ) ;
55
+ result . MyObjectWithNested [ 1 ] . should . deep . equal ( [ 'NestedScalar' ] ) ;
56
56
ignoreList . length . should . equal ( 2 ) ;
57
57
ignoreList [ 0 ] . should . equal ( 'MyObjectWithNested-ObjectNestingOtherObject-ROOT' ) ;
58
58
ignoreList [ 1 ] . should . equal ( 'NestedObject-ObjectField-ObjectNestingOtherObject' ) ;
@@ -73,7 +73,7 @@ describe('Build query tree from field', () => {
73
73
result . MyCircle [ 0 ] . should . include . all . keys ( 'DeepNest' ) ;
74
74
result . MyCircle [ 0 ] . DeepNest . length . should . equal ( 1 ) ;
75
75
result . MyCircle [ 0 ] . DeepNest [ 0 ] . NotSoDeepNest . length . should . equal ( 2 ) ;
76
- result . MyCircle [ 0 ] . DeepNest [ 0 ] . NotSoDeepNest [ 0 ] . should . equal ( 'MyScalar' ) ;
76
+ result . MyCircle [ 0 ] . DeepNest [ 0 ] . NotSoDeepNest [ 0 ] . should . deep . equal ( [ 'MyScalar' ] ) ;
77
77
} ) ;
78
78
79
79
it ( 'should handle very similar objects[test covering skipList naming bug]' , ( ) => {
@@ -129,8 +129,8 @@ describe('Build query tree from field', () => {
129
129
} ,
130
130
typeDictionary
131
131
) ;
132
- result [ 'MyObjectField(ip: "192.168.0.1")' ] [ 0 ] . should . equal ( 'MyScalar' ) ;
133
- result [ 'MyObjectField(ip: "192.168.0.1")' ] [ 1 ] . should . equal ( 'MyScalar2' ) ;
132
+ result [ 'MyObjectField(ip: "192.168.0.1")' ] [ 0 ] . should . deep . equal ( [ 'MyScalar' ] ) ;
133
+ result [ 'MyObjectField(ip: "192.168.0.1")' ] [ 1 ] . should . deep . equal ( [ 'MyScalar2' ] ) ;
134
134
} ) ;
135
135
136
136
it ( 'should ignore nullable args' , ( ) => {
@@ -149,8 +149,8 @@ describe('Build query tree from field', () => {
149
149
} ,
150
150
typeDictionary
151
151
) ;
152
- result . MyObjectField [ 0 ] . should . equal ( 'MyScalar' ) ;
153
- result . MyObjectField [ 1 ] . should . equal ( 'MyScalar2' ) ;
152
+ result . MyObjectField [ 0 ] . should . deep . equal ( [ 'MyScalar' ] ) ;
153
+ result . MyObjectField [ 1 ] . should . deep . equal ( [ 'MyScalar2' ] ) ;
154
154
} ) ;
155
155
156
156
it ( 'should ignore nullable args for SCALAR fields' , ( ) => {
@@ -169,7 +169,7 @@ describe('Build query tree from field', () => {
169
169
} ,
170
170
typeDictionary
171
171
) ;
172
- result . should . equal ( 'MyScalar' ) ;
172
+ result . should . deep . equal ( [ 'MyScalar' ] ) ;
173
173
} ) ;
174
174
175
175
it ( 'should use single example from description for non-nullable args for SCALAR fields' , ( ) => {
@@ -189,7 +189,7 @@ describe('Build query tree from field', () => {
189
189
} ,
190
190
typeDictionary
191
191
) ;
192
- result . should . equal ( 'MyScalar(ip: "192.168.0.1")' ) ;
192
+ result . should . deep . equal ( [ 'MyScalar(ip: "192.168.0.1")' ] ) ;
193
193
} ) ;
194
194
195
195
it ( 'should use multiple examples from description for non-nullable args for SCALAR fields' , ( ) => {
@@ -209,6 +209,6 @@ describe('Build query tree from field', () => {
209
209
} ,
210
210
typeDictionary
211
211
) ;
212
- result . should . equal ( 'MyScalar(ip: "192.168.0.1") MyScalar(ip: "192.168.0.2")' ) ;
212
+ result . should . deep . equal ( [ 'MyScalar(ip: "192.168.0.1")' , ' MyScalar(ip: "192.168.0.2")'] ) ;
213
213
} ) ;
214
214
} ) ;
0 commit comments