Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests: use consistent order of fields in snapshots #2094

Merged
merged 1 commit into from Aug 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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