@@ -27,30 +27,30 @@ function filterNodes(predicate: (node: ASTNode) => boolean): Array<string> {
27
27
describe ( 'AST node predicates' , ( ) => {
28
28
it ( 'isDefinitionNode' , ( ) => {
29
29
expect ( filterNodes ( isDefinitionNode ) ) . to . deep . equal ( [
30
- 'OperationDefinition' ,
31
- 'FragmentDefinition' ,
32
- 'SchemaDefinition' ,
33
- 'ScalarTypeDefinition' ,
34
- 'ObjectTypeDefinition' ,
35
- 'InterfaceTypeDefinition' ,
36
- 'UnionTypeDefinition' ,
30
+ 'DirectiveDefinition' ,
37
31
'EnumTypeDefinition' ,
32
+ 'EnumTypeExtension' ,
33
+ 'FragmentDefinition' ,
38
34
'InputObjectTypeDefinition' ,
39
- 'DirectiveDefinition' ,
40
- 'SchemaExtension' ,
41
- 'ScalarTypeExtension' ,
42
- 'ObjectTypeExtension' ,
35
+ 'InputObjectTypeExtension' ,
36
+ 'InterfaceTypeDefinition' ,
43
37
'InterfaceTypeExtension' ,
38
+ 'ObjectTypeDefinition' ,
39
+ 'ObjectTypeExtension' ,
40
+ 'OperationDefinition' ,
41
+ 'ScalarTypeDefinition' ,
42
+ 'ScalarTypeExtension' ,
43
+ 'SchemaDefinition' ,
44
+ 'SchemaExtension' ,
45
+ 'UnionTypeDefinition' ,
44
46
'UnionTypeExtension' ,
45
- 'EnumTypeExtension' ,
46
- 'InputObjectTypeExtension' ,
47
47
] ) ;
48
48
} ) ;
49
49
50
50
it ( 'isExecutableDefinitionNode' , ( ) => {
51
51
expect ( filterNodes ( isExecutableDefinitionNode ) ) . to . deep . equal ( [
52
- 'OperationDefinition' ,
53
52
'FragmentDefinition' ,
53
+ 'OperationDefinition' ,
54
54
] ) ;
55
55
} ) ;
56
56
@@ -64,15 +64,15 @@ describe('AST node predicates', () => {
64
64
65
65
it ( 'isValueNode' , ( ) => {
66
66
expect ( filterNodes ( isValueNode ) ) . to . deep . equal ( [
67
- 'Variable' ,
68
- 'IntValue' ,
69
- 'FloatValue' ,
70
- 'StringValue' ,
71
67
'BooleanValue' ,
72
- 'NullValue' ,
73
68
'EnumValue' ,
69
+ 'FloatValue' ,
70
+ 'IntValue' ,
74
71
'ListValue' ,
72
+ 'NullValue' ,
75
73
'ObjectValue' ,
74
+ 'StringValue' ,
75
+ 'Variable' ,
76
76
] ) ;
77
77
} ) ;
78
78
@@ -89,56 +89,56 @@ describe('AST node predicates', () => {
89
89
90
90
it ( 'isTypeNode' , ( ) => {
91
91
expect ( filterNodes ( isTypeNode ) ) . to . deep . equal ( [
92
- 'NamedType' ,
93
92
'ListType' ,
93
+ 'NamedType' ,
94
94
'NonNullType' ,
95
95
] ) ;
96
96
} ) ;
97
97
98
98
it ( 'isTypeSystemDefinitionNode' , ( ) => {
99
99
expect ( filterNodes ( isTypeSystemDefinitionNode ) ) . to . deep . equal ( [
100
- 'SchemaDefinition' ,
101
- 'ScalarTypeDefinition' ,
102
- 'ObjectTypeDefinition' ,
103
- 'InterfaceTypeDefinition' ,
104
- 'UnionTypeDefinition' ,
100
+ 'DirectiveDefinition' ,
105
101
'EnumTypeDefinition' ,
106
102
'InputObjectTypeDefinition' ,
107
- 'DirectiveDefinition' ,
103
+ 'InterfaceTypeDefinition' ,
104
+ 'ObjectTypeDefinition' ,
105
+ 'ScalarTypeDefinition' ,
106
+ 'SchemaDefinition' ,
107
+ 'UnionTypeDefinition' ,
108
108
] ) ;
109
109
} ) ;
110
110
111
111
it ( 'isTypeDefinitionNode' , ( ) => {
112
112
expect ( filterNodes ( isTypeDefinitionNode ) ) . to . deep . equal ( [
113
- 'ScalarTypeDefinition' ,
114
- 'ObjectTypeDefinition' ,
115
- 'InterfaceTypeDefinition' ,
116
- 'UnionTypeDefinition' ,
117
113
'EnumTypeDefinition' ,
118
114
'InputObjectTypeDefinition' ,
115
+ 'InterfaceTypeDefinition' ,
116
+ 'ObjectTypeDefinition' ,
117
+ 'ScalarTypeDefinition' ,
118
+ 'UnionTypeDefinition' ,
119
119
] ) ;
120
120
} ) ;
121
121
122
122
it ( 'isTypeSystemExtensionNode' , ( ) => {
123
123
expect ( filterNodes ( isTypeSystemExtensionNode ) ) . to . deep . equal ( [
124
- 'SchemaExtension' ,
125
- 'ScalarTypeExtension' ,
126
- 'ObjectTypeExtension' ,
127
- 'InterfaceTypeExtension' ,
128
- 'UnionTypeExtension' ,
129
124
'EnumTypeExtension' ,
130
125
'InputObjectTypeExtension' ,
126
+ 'InterfaceTypeExtension' ,
127
+ 'ObjectTypeExtension' ,
128
+ 'ScalarTypeExtension' ,
129
+ 'SchemaExtension' ,
130
+ 'UnionTypeExtension' ,
131
131
] ) ;
132
132
} ) ;
133
133
134
134
it ( 'isTypeExtensionNode' , ( ) => {
135
135
expect ( filterNodes ( isTypeExtensionNode ) ) . to . deep . equal ( [
136
- 'ScalarTypeExtension' ,
137
- 'ObjectTypeExtension' ,
138
- 'InterfaceTypeExtension' ,
139
- 'UnionTypeExtension' ,
140
136
'EnumTypeExtension' ,
141
137
'InputObjectTypeExtension' ,
138
+ 'InterfaceTypeExtension' ,
139
+ 'ObjectTypeExtension' ,
140
+ 'ScalarTypeExtension' ,
141
+ 'UnionTypeExtension' ,
142
142
] ) ;
143
143
} ) ;
144
144
} ) ;
0 commit comments