Skip to content

Commit 68d6402

Browse files
tests: use consistent order of fields in snapshots (#2094)
1 parent 901c4e7 commit 68d6402

File tree

4 files changed

+23
-23
lines changed

4 files changed

+23
-23
lines changed

src/type/__tests__/definition-test.js

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -187,15 +187,15 @@ describe('Type System: Objects', () => {
187187
});
188188

189189
expect(TypeWithDeprecatedField.getFields().bar).to.deep.equal({
190-
type: ScalarType,
191-
deprecationReason: 'A terrible reason',
192-
isDeprecated: true,
193190
name: 'bar',
191+
description: undefined,
192+
type: ScalarType,
194193
args: [],
195-
astNode: undefined,
196194
resolve: undefined,
197195
subscribe: undefined,
198-
description: undefined,
196+
isDeprecated: true,
197+
deprecationReason: 'A terrible reason',
198+
astNode: undefined,
199199
});
200200
});
201201

@@ -209,14 +209,14 @@ describe('Type System: Objects', () => {
209209
expect(objType.getFields()).to.deep.equal({
210210
f: {
211211
name: 'f',
212+
description: undefined,
212213
type: ScalarType,
213214
args: [],
215+
resolve: undefined,
216+
subscribe: undefined,
214217
isDeprecated: false,
215218
deprecationReason: undefined,
216219
astNode: undefined,
217-
resolve: undefined,
218-
subscribe: undefined,
219-
description: undefined,
220220
},
221221
});
222222
});
@@ -236,22 +236,22 @@ describe('Type System: Objects', () => {
236236
expect(objType.getFields()).to.deep.equal({
237237
f: {
238238
name: 'f',
239+
description: undefined,
239240
type: ScalarType,
240241
args: [
241242
{
242243
name: 'arg',
243-
type: ScalarType,
244244
description: null,
245+
type: ScalarType,
245246
defaultValue: undefined,
246247
astNode: undefined,
247248
},
248249
],
250+
resolve: undefined,
251+
subscribe: undefined,
249252
isDeprecated: false,
250253
deprecationReason: undefined,
251254
astNode: undefined,
252-
resolve: undefined,
253-
subscribe: undefined,
254-
description: undefined,
255255
},
256256
});
257257
});
@@ -541,17 +541,17 @@ describe('Type System: Enums', () => {
541541
{
542542
name: 'NULL',
543543
description: undefined,
544+
value: null,
544545
isDeprecated: false,
545546
deprecationReason: undefined,
546-
value: null,
547547
astNode: undefined,
548548
},
549549
{
550550
name: 'UNDEFINED',
551551
description: undefined,
552+
value: undefined,
552553
isDeprecated: false,
553554
deprecationReason: undefined,
554-
value: undefined,
555555
astNode: undefined,
556556
},
557557
]);

src/type/__tests__/directive-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,15 +36,15 @@ describe('Type System: Directive', () => {
3636
args: [
3737
{
3838
name: 'foo',
39-
type: GraphQLString,
4039
description: null,
40+
type: GraphQLString,
4141
defaultValue: undefined,
4242
astNode: undefined,
4343
},
4444
{
4545
name: 'bar',
46-
type: GraphQLInt,
4746
description: null,
47+
type: GraphQLInt,
4848
defaultValue: undefined,
4949
astNode: undefined,
5050
},

src/type/__tests__/enumType-test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -341,16 +341,16 @@ describe('Type System: Enum Values', () => {
341341
expect(values).to.have.deep.ordered.members([
342342
{
343343
name: 'ONE',
344-
value: Complex1,
345344
description: undefined,
345+
value: Complex1,
346346
isDeprecated: false,
347347
deprecationReason: undefined,
348348
astNode: undefined,
349349
},
350350
{
351351
name: 'TWO',
352-
value: Complex2,
353352
description: undefined,
353+
value: Complex2,
354354
isDeprecated: false,
355355
deprecationReason: undefined,
356356
astNode: undefined,

src/utilities/__tests__/buildClientSchema-test.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -358,40 +358,40 @@ describe('Type System: build schema from introspection', () => {
358358
expect(clientFoodEnum.getValues()).to.deep.equal([
359359
{
360360
name: 'VEGETABLES',
361-
value: 'VEGETABLES',
362361
description: 'Foods that are vegetables.',
362+
value: 'VEGETABLES',
363363
isDeprecated: false,
364364
deprecationReason: null,
365365
astNode: undefined,
366366
},
367367
{
368368
name: 'FRUITS',
369-
value: 'FRUITS',
370369
description: 'Foods that are fruits.',
370+
value: 'FRUITS',
371371
isDeprecated: false,
372372
deprecationReason: null,
373373
astNode: undefined,
374374
},
375375
{
376376
name: 'OILS',
377-
value: 'OILS',
378377
description: 'Foods that are oils.',
378+
value: 'OILS',
379379
isDeprecated: false,
380380
deprecationReason: null,
381381
astNode: undefined,
382382
},
383383
{
384384
name: 'DAIRY',
385-
value: 'DAIRY',
386385
description: 'Foods that are dairy.',
386+
value: 'DAIRY',
387387
isDeprecated: false,
388388
deprecationReason: null,
389389
astNode: undefined,
390390
},
391391
{
392392
name: 'MEAT',
393-
value: 'MEAT',
394393
description: 'Foods that are meat.',
394+
value: 'MEAT',
395395
isDeprecated: false,
396396
deprecationReason: null,
397397
astNode: undefined,

0 commit comments

Comments
 (0)