Skip to content

Commit

Permalink
tests: use consistent order of fields in snapshots (#2094)
Browse files Browse the repository at this point in the history
  • Loading branch information
IvanGoncharov committed Aug 18, 2019
1 parent 901c4e7 commit 68d6402
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 23 deletions.
28 changes: 14 additions & 14 deletions src/type/__tests__/definition-test.js
Expand Up @@ -187,15 +187,15 @@ describe('Type System: Objects', () => {
});

expect(TypeWithDeprecatedField.getFields().bar).to.deep.equal({
type: ScalarType,
deprecationReason: 'A terrible reason',
isDeprecated: true,
name: 'bar',
description: undefined,
type: ScalarType,
args: [],
astNode: undefined,
resolve: undefined,
subscribe: undefined,
description: undefined,
isDeprecated: true,
deprecationReason: 'A terrible reason',
astNode: undefined,
});
});

Expand All @@ -209,14 +209,14 @@ describe('Type System: Objects', () => {
expect(objType.getFields()).to.deep.equal({
f: {
name: 'f',
description: undefined,
type: ScalarType,
args: [],
resolve: undefined,
subscribe: undefined,
isDeprecated: false,
deprecationReason: undefined,
astNode: undefined,
resolve: undefined,
subscribe: undefined,
description: undefined,
},
});
});
Expand All @@ -236,22 +236,22 @@ describe('Type System: Objects', () => {
expect(objType.getFields()).to.deep.equal({
f: {
name: 'f',
description: undefined,
type: ScalarType,
args: [
{
name: 'arg',
type: ScalarType,
description: null,
type: ScalarType,
defaultValue: undefined,
astNode: undefined,
},
],
resolve: undefined,
subscribe: undefined,
isDeprecated: false,
deprecationReason: undefined,
astNode: undefined,
resolve: undefined,
subscribe: undefined,
description: undefined,
},
});
});
Expand Down Expand Up @@ -541,17 +541,17 @@ describe('Type System: Enums', () => {
{
name: 'NULL',
description: undefined,
value: null,
isDeprecated: false,
deprecationReason: undefined,
value: null,
astNode: undefined,
},
{
name: 'UNDEFINED',
description: undefined,
value: undefined,
isDeprecated: false,
deprecationReason: undefined,
value: undefined,
astNode: undefined,
},
]);
Expand Down
4 changes: 2 additions & 2 deletions src/type/__tests__/directive-test.js
Expand Up @@ -36,15 +36,15 @@ describe('Type System: Directive', () => {
args: [
{
name: 'foo',
type: GraphQLString,
description: null,
type: GraphQLString,
defaultValue: undefined,
astNode: undefined,
},
{
name: 'bar',
type: GraphQLInt,
description: null,
type: GraphQLInt,
defaultValue: undefined,
astNode: undefined,
},
Expand Down
4 changes: 2 additions & 2 deletions src/type/__tests__/enumType-test.js
Expand Up @@ -341,16 +341,16 @@ describe('Type System: Enum Values', () => {
expect(values).to.have.deep.ordered.members([
{
name: 'ONE',
value: Complex1,
description: undefined,
value: Complex1,
isDeprecated: false,
deprecationReason: undefined,
astNode: undefined,
},
{
name: 'TWO',
value: Complex2,
description: undefined,
value: Complex2,
isDeprecated: false,
deprecationReason: undefined,
astNode: undefined,
Expand Down
10 changes: 5 additions & 5 deletions src/utilities/__tests__/buildClientSchema-test.js
Expand Up @@ -358,40 +358,40 @@ describe('Type System: build schema from introspection', () => {
expect(clientFoodEnum.getValues()).to.deep.equal([
{
name: 'VEGETABLES',
value: 'VEGETABLES',
description: 'Foods that are vegetables.',
value: 'VEGETABLES',
isDeprecated: false,
deprecationReason: null,
astNode: undefined,
},
{
name: 'FRUITS',
value: 'FRUITS',
description: 'Foods that are fruits.',
value: 'FRUITS',
isDeprecated: false,
deprecationReason: null,
astNode: undefined,
},
{
name: 'OILS',
value: 'OILS',
description: 'Foods that are oils.',
value: 'OILS',
isDeprecated: false,
deprecationReason: null,
astNode: undefined,
},
{
name: 'DAIRY',
value: 'DAIRY',
description: 'Foods that are dairy.',
value: 'DAIRY',
isDeprecated: false,
deprecationReason: null,
astNode: undefined,
},
{
name: 'MEAT',
value: 'MEAT',
description: 'Foods that are meat.',
value: 'MEAT',
isDeprecated: false,
deprecationReason: null,
astNode: undefined,
Expand Down

0 comments on commit 68d6402

Please sign in to comment.