@@ -27,30 +27,30 @@ function filterNodes(predicate: (node: ASTNode) => boolean): Array<string> {
2727describe ( 'AST node predicates' , ( ) => {
2828 it ( 'isDefinitionNode' , ( ) => {
2929 expect ( filterNodes ( isDefinitionNode ) ) . to . deep . equal ( [
30- 'OperationDefinition' ,
31- 'FragmentDefinition' ,
32- 'SchemaDefinition' ,
33- 'ScalarTypeDefinition' ,
34- 'ObjectTypeDefinition' ,
35- 'InterfaceTypeDefinition' ,
36- 'UnionTypeDefinition' ,
30+ 'DirectiveDefinition' ,
3731 'EnumTypeDefinition' ,
32+ 'EnumTypeExtension' ,
33+ 'FragmentDefinition' ,
3834 'InputObjectTypeDefinition' ,
39- 'DirectiveDefinition' ,
40- 'SchemaExtension' ,
41- 'ScalarTypeExtension' ,
42- 'ObjectTypeExtension' ,
35+ 'InputObjectTypeExtension' ,
36+ 'InterfaceTypeDefinition' ,
4337 'InterfaceTypeExtension' ,
38+ 'ObjectTypeDefinition' ,
39+ 'ObjectTypeExtension' ,
40+ 'OperationDefinition' ,
41+ 'ScalarTypeDefinition' ,
42+ 'ScalarTypeExtension' ,
43+ 'SchemaDefinition' ,
44+ 'SchemaExtension' ,
45+ 'UnionTypeDefinition' ,
4446 'UnionTypeExtension' ,
45- 'EnumTypeExtension' ,
46- 'InputObjectTypeExtension' ,
4747 ] ) ;
4848 } ) ;
4949
5050 it ( 'isExecutableDefinitionNode' , ( ) => {
5151 expect ( filterNodes ( isExecutableDefinitionNode ) ) . to . deep . equal ( [
52- 'OperationDefinition' ,
5352 'FragmentDefinition' ,
53+ 'OperationDefinition' ,
5454 ] ) ;
5555 } ) ;
5656
@@ -64,15 +64,15 @@ describe('AST node predicates', () => {
6464
6565 it ( 'isValueNode' , ( ) => {
6666 expect ( filterNodes ( isValueNode ) ) . to . deep . equal ( [
67- 'Variable' ,
68- 'IntValue' ,
69- 'FloatValue' ,
70- 'StringValue' ,
7167 'BooleanValue' ,
72- 'NullValue' ,
7368 'EnumValue' ,
69+ 'FloatValue' ,
70+ 'IntValue' ,
7471 'ListValue' ,
72+ 'NullValue' ,
7573 'ObjectValue' ,
74+ 'StringValue' ,
75+ 'Variable' ,
7676 ] ) ;
7777 } ) ;
7878
@@ -89,56 +89,56 @@ describe('AST node predicates', () => {
8989
9090 it ( 'isTypeNode' , ( ) => {
9191 expect ( filterNodes ( isTypeNode ) ) . to . deep . equal ( [
92- 'NamedType' ,
9392 'ListType' ,
93+ 'NamedType' ,
9494 'NonNullType' ,
9595 ] ) ;
9696 } ) ;
9797
9898 it ( 'isTypeSystemDefinitionNode' , ( ) => {
9999 expect ( filterNodes ( isTypeSystemDefinitionNode ) ) . to . deep . equal ( [
100- 'SchemaDefinition' ,
101- 'ScalarTypeDefinition' ,
102- 'ObjectTypeDefinition' ,
103- 'InterfaceTypeDefinition' ,
104- 'UnionTypeDefinition' ,
100+ 'DirectiveDefinition' ,
105101 'EnumTypeDefinition' ,
106102 'InputObjectTypeDefinition' ,
107- 'DirectiveDefinition' ,
103+ 'InterfaceTypeDefinition' ,
104+ 'ObjectTypeDefinition' ,
105+ 'ScalarTypeDefinition' ,
106+ 'SchemaDefinition' ,
107+ 'UnionTypeDefinition' ,
108108 ] ) ;
109109 } ) ;
110110
111111 it ( 'isTypeDefinitionNode' , ( ) => {
112112 expect ( filterNodes ( isTypeDefinitionNode ) ) . to . deep . equal ( [
113- 'ScalarTypeDefinition' ,
114- 'ObjectTypeDefinition' ,
115- 'InterfaceTypeDefinition' ,
116- 'UnionTypeDefinition' ,
117113 'EnumTypeDefinition' ,
118114 'InputObjectTypeDefinition' ,
115+ 'InterfaceTypeDefinition' ,
116+ 'ObjectTypeDefinition' ,
117+ 'ScalarTypeDefinition' ,
118+ 'UnionTypeDefinition' ,
119119 ] ) ;
120120 } ) ;
121121
122122 it ( 'isTypeSystemExtensionNode' , ( ) => {
123123 expect ( filterNodes ( isTypeSystemExtensionNode ) ) . to . deep . equal ( [
124- 'SchemaExtension' ,
125- 'ScalarTypeExtension' ,
126- 'ObjectTypeExtension' ,
127- 'InterfaceTypeExtension' ,
128- 'UnionTypeExtension' ,
129124 'EnumTypeExtension' ,
130125 'InputObjectTypeExtension' ,
126+ 'InterfaceTypeExtension' ,
127+ 'ObjectTypeExtension' ,
128+ 'ScalarTypeExtension' ,
129+ 'SchemaExtension' ,
130+ 'UnionTypeExtension' ,
131131 ] ) ;
132132 } ) ;
133133
134134 it ( 'isTypeExtensionNode' , ( ) => {
135135 expect ( filterNodes ( isTypeExtensionNode ) ) . to . deep . equal ( [
136- 'ScalarTypeExtension' ,
137- 'ObjectTypeExtension' ,
138- 'InterfaceTypeExtension' ,
139- 'UnionTypeExtension' ,
140136 'EnumTypeExtension' ,
141137 'InputObjectTypeExtension' ,
138+ 'InterfaceTypeExtension' ,
139+ 'ObjectTypeExtension' ,
140+ 'ScalarTypeExtension' ,
141+ 'UnionTypeExtension' ,
142142 ] ) ;
143143 } ) ;
144144} ) ;
0 commit comments