@@ -641,7 +641,7 @@ describe('Type System: Union types must be valid', () => {
641
641
SomeEnumType ,
642
642
SomeInputObjectType ,
643
643
] ;
644
- badUnionMemberTypes . forEach ( memberType => {
644
+ for ( const memberType of badUnionMemberTypes ) {
645
645
const badSchema = schemaWithFieldType (
646
646
new GraphQLUnionType ( { name : 'BadUnion' , types : [ memberType ] } ) ,
647
647
) ;
@@ -652,7 +652,7 @@ describe('Type System: Union types must be valid', () => {
652
652
`it cannot include ${ memberType } .` ,
653
653
} ,
654
654
] ) ;
655
- } ) ;
655
+ }
656
656
} ) ;
657
657
} ) ;
658
658
@@ -829,12 +829,12 @@ describe('Type System: Object fields must have output types', () => {
829
829
} ) ;
830
830
}
831
831
832
- outputTypes . forEach ( type => {
832
+ for ( const type of outputTypes ) {
833
833
it ( `accepts an output type as an Object field type: ${ type } ` , ( ) => {
834
834
const schema = schemaWithObjectFieldOfType ( type ) ;
835
835
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
836
836
} ) ;
837
- } ) ;
837
+ }
838
838
839
839
it ( 'rejects an empty Object field type' , ( ) => {
840
840
const schema = schemaWithObjectFieldOfType ( undefined ) ;
@@ -846,7 +846,7 @@ describe('Type System: Object fields must have output types', () => {
846
846
] ) ;
847
847
} ) ;
848
848
849
- notOutputTypes . forEach ( type => {
849
+ for ( const type of notOutputTypes ) {
850
850
it ( `rejects a non-output type as an Object field type: ${ type } ` , ( ) => {
851
851
const schema = schemaWithObjectFieldOfType ( type ) ;
852
852
expect ( validateSchema ( schema ) ) . to . deep . equal ( [
@@ -855,7 +855,7 @@ describe('Type System: Object fields must have output types', () => {
855
855
} ,
856
856
] ) ;
857
857
} ) ;
858
- } ) ;
858
+ }
859
859
860
860
it ( 'rejects a non-type value as an Object field type' , ( ) => {
861
861
const schema = schemaWithObjectFieldOfType ( Number ) ;
@@ -1123,12 +1123,12 @@ describe('Type System: Interface fields must have output types', () => {
1123
1123
} ) ;
1124
1124
}
1125
1125
1126
- outputTypes . forEach ( type => {
1126
+ for ( const type of outputTypes ) {
1127
1127
it ( `accepts an output type as an Interface field type: ${ type } ` , ( ) => {
1128
1128
const schema = schemaWithInterfaceFieldOfType ( type ) ;
1129
1129
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
1130
1130
} ) ;
1131
- } ) ;
1131
+ }
1132
1132
1133
1133
it ( 'rejects an empty Interface field type' , ( ) => {
1134
1134
const schema = schemaWithInterfaceFieldOfType ( undefined ) ;
@@ -1144,7 +1144,7 @@ describe('Type System: Interface fields must have output types', () => {
1144
1144
] ) ;
1145
1145
} ) ;
1146
1146
1147
- notOutputTypes . forEach ( type => {
1147
+ for ( const type of notOutputTypes ) {
1148
1148
it ( `rejects a non-output type as an Interface field type: ${ type } ` , ( ) => {
1149
1149
const schema = schemaWithInterfaceFieldOfType ( type ) ;
1150
1150
expect ( validateSchema ( schema ) ) . to . deep . equal ( [
@@ -1156,7 +1156,7 @@ describe('Type System: Interface fields must have output types', () => {
1156
1156
} ,
1157
1157
] ) ;
1158
1158
} ) ;
1159
- } ) ;
1159
+ }
1160
1160
1161
1161
it ( 'rejects a non-type value as an Interface field type' , ( ) => {
1162
1162
const schema = schemaWithInterfaceFieldOfType ( Number ) ;
@@ -1243,12 +1243,12 @@ describe('Type System: Field arguments must have input types', () => {
1243
1243
} ) ;
1244
1244
}
1245
1245
1246
- inputTypes . forEach ( type => {
1246
+ for ( const type of inputTypes ) {
1247
1247
it ( `accepts an input type as a field arg type: ${ type } ` , ( ) => {
1248
1248
const schema = schemaWithArgOfType ( type ) ;
1249
1249
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
1250
1250
} ) ;
1251
- } ) ;
1251
+ }
1252
1252
1253
1253
it ( 'rejects an empty field arg type' , ( ) => {
1254
1254
const schema = schemaWithArgOfType ( undefined ) ;
@@ -1260,7 +1260,7 @@ describe('Type System: Field arguments must have input types', () => {
1260
1260
] ) ;
1261
1261
} ) ;
1262
1262
1263
- notInputTypes . forEach ( type => {
1263
+ for ( const type of notInputTypes ) {
1264
1264
it ( `rejects a non-input type as a field arg type: ${ type } ` , ( ) => {
1265
1265
const schema = schemaWithArgOfType ( type ) ;
1266
1266
expect ( validateSchema ( schema ) ) . to . deep . equal ( [
@@ -1269,7 +1269,7 @@ describe('Type System: Field arguments must have input types', () => {
1269
1269
} ,
1270
1270
] ) ;
1271
1271
} ) ;
1272
- } ) ;
1272
+ }
1273
1273
1274
1274
it ( 'rejects a non-type value as a field arg type' , ( ) => {
1275
1275
const schema = schemaWithArgOfType ( Number ) ;
@@ -1327,12 +1327,12 @@ describe('Type System: Input Object fields must have input types', () => {
1327
1327
} ) ;
1328
1328
}
1329
1329
1330
- inputTypes . forEach ( type => {
1330
+ for ( const type of inputTypes ) {
1331
1331
it ( `accepts an input type as an input field type: ${ type } ` , ( ) => {
1332
1332
const schema = schemaWithInputFieldOfType ( type ) ;
1333
1333
expect ( validateSchema ( schema ) ) . to . deep . equal ( [ ] ) ;
1334
1334
} ) ;
1335
- } ) ;
1335
+ }
1336
1336
1337
1337
it ( 'rejects an empty input field type' , ( ) => {
1338
1338
const schema = schemaWithInputFieldOfType ( undefined ) ;
@@ -1344,7 +1344,7 @@ describe('Type System: Input Object fields must have input types', () => {
1344
1344
] ) ;
1345
1345
} ) ;
1346
1346
1347
- notInputTypes . forEach ( type => {
1347
+ for ( const type of notInputTypes ) {
1348
1348
it ( `rejects a non-input type as an input field type: ${ type } ` , ( ) => {
1349
1349
const schema = schemaWithInputFieldOfType ( type ) ;
1350
1350
expect ( validateSchema ( schema ) ) . to . deep . equal ( [
@@ -1353,7 +1353,7 @@ describe('Type System: Input Object fields must have input types', () => {
1353
1353
} ,
1354
1354
] ) ;
1355
1355
} ) ;
1356
- } ) ;
1356
+ }
1357
1357
1358
1358
it ( 'rejects a non-type value as an input field type' , ( ) => {
1359
1359
const schema = schemaWithInputFieldOfType ( Number ) ;
0 commit comments