@@ -52,7 +52,7 @@ describe('graphql-hint', () => {
52
52
it ( 'attaches a GraphQL hint function with correct mode/hint options' , async ( ) => {
53
53
const editor = await createEditorWithHint ( ) ;
54
54
expect ( editor . getHelpers ( editor . getCursor ( ) , 'hint' ) ) . to . not . have . lengthOf (
55
- 0
55
+ 0 ,
56
56
) ;
57
57
} ) ;
58
58
@@ -72,11 +72,11 @@ describe('graphql-hint', () => {
72
72
const suggestions = await getHintSuggestions ( '{ ' , { line : 0 , ch : 2 } ) ;
73
73
const fieldConfig = TestSchema . getQueryType ( ) . getFields ( ) ;
74
74
const fieldNames = Object . keys ( fieldConfig ) . filter (
75
- name => ! fieldConfig [ name ] . isDeprecated
75
+ name => ! fieldConfig [ name ] . isDeprecated ,
76
76
) ;
77
77
checkSuggestions (
78
78
fieldNames . concat ( [ '__typename' , '__schema' , '__type' ] ) ,
79
- suggestions . list
79
+ suggestions . list ,
80
80
) ;
81
81
82
82
const fieldTypes = fieldNames . map ( name => fieldConfig [ name ] . type ) ;
@@ -85,7 +85,7 @@ describe('graphql-hint', () => {
85
85
item =>
86
86
item . text !== '__schema' &&
87
87
item . text !== '__type' &&
88
- item . text !== '__typename'
88
+ item . text !== '__typename' ,
89
89
)
90
90
. map ( item => item . type ) ;
91
91
expect ( fieldTypes ) . to . deep . equal ( expectedTypes ) ;
@@ -99,7 +99,7 @@ describe('graphql-hint', () => {
99
99
const fieldConfig = TestSchema . getType ( 'First' ) . getFields ( ) ;
100
100
checkSuggestions (
101
101
[ ...Object . keys ( fieldConfig ) , '__typename' ] ,
102
- suggestions . list
102
+ suggestions . list ,
103
103
) ;
104
104
} ) ;
105
105
@@ -161,7 +161,7 @@ describe('graphql-hint', () => {
161
161
it ( 'provides correct directive suggestions on args definitions' , async ( ) => {
162
162
const suggestions = await getHintSuggestions (
163
163
'type Type { field(arg: String @' ,
164
- { line : 0 , ch : 31 }
164
+ { line : 0 , ch : 31 } ,
165
165
) ;
166
166
const directiveNames = [ 'onArg' , 'onAllDefs' ] ;
167
167
checkSuggestions ( directiveNames , suggestions . list ) ;
@@ -209,23 +209,23 @@ describe('graphql-hint', () => {
209
209
ch : 21 ,
210
210
} ) ;
211
211
const testInputNames = Object . keys (
212
- TestSchema . getType ( 'TestInput' ) . getFields ( )
212
+ TestSchema . getType ( 'TestInput' ) . getFields ( ) ,
213
213
) ;
214
214
checkSuggestions ( testInputNames , suggestions . list ) ;
215
215
} ) ;
216
216
217
217
it ( 'provides fragment name suggestion' , async ( ) => {
218
218
const suggestions = await getHintSuggestions (
219
219
'fragment Foo on Test { id } query { ...' ,
220
- { line : 0 , ch : 40 }
220
+ { line : 0 , ch : 40 } ,
221
221
) ;
222
222
checkSuggestions ( [ 'Foo' ] , suggestions . list ) ;
223
223
} ) ;
224
224
225
225
it ( 'provides fragment names for fragments defined lower' , async ( ) => {
226
226
const suggestions = await getHintSuggestions (
227
227
'query { ... } fragment Foo on Test { id }' ,
228
- { line : 0 , ch : 11 }
228
+ { line : 0 , ch : 11 } ,
229
229
) ;
230
230
checkSuggestions ( [ 'Foo' ] , suggestions . list ) ;
231
231
} ) ;
@@ -237,15 +237,15 @@ describe('graphql-hint', () => {
237
237
'fragment Baz on Second { name } ' +
238
238
'fragment Qux on TestUnion { name } ' +
239
239
'fragment Nrf on Test { id }' ,
240
- { line : 0 , ch : 31 }
240
+ { line : 0 , ch : 31 } ,
241
241
) ;
242
242
checkSuggestions ( [ 'Bar' , 'Baz' , 'Qux' ] , suggestions . list ) ;
243
243
} ) ;
244
244
245
245
it ( 'provides correct field name suggestion inside inline fragment' , async ( ) => {
246
246
const suggestions = await getHintSuggestions (
247
247
'fragment Foo on TestUnion { ... on First { ' ,
248
- { line : 0 , ch : 43 }
248
+ { line : 0 , ch : 43 } ,
249
249
) ;
250
250
const fieldNames = Object . keys ( TestSchema . getType ( 'First' ) . getFields ( ) ) ;
251
251
fieldNames . push ( '__typename' ) ;
@@ -255,7 +255,7 @@ describe('graphql-hint', () => {
255
255
it ( 'provides correct field name suggestion inside typeless inline fragment' , async ( ) => {
256
256
const suggestions = await getHintSuggestions (
257
257
'fragment Foo on First { ... { ' ,
258
- { line : 0 , ch : 30 }
258
+ { line : 0 , ch : 30 } ,
259
259
) ;
260
260
const fieldNames = Object . keys ( TestSchema . getType ( 'First' ) . getFields ( ) ) ;
261
261
fieldNames . push ( '__typename' ) ;
0 commit comments