@@ -9,11 +9,7 @@ import { inspect } from '../../jsutils/inspect.js';
9
9
import { GraphQLError } from '../../error/GraphQLError.js' ;
10
10
11
11
import type { Token } from '../ast.js' ;
12
- import {
13
- isPunctuatorTokenKind ,
14
- Lexer ,
15
- SchemaCoordinateLexer ,
16
- } from '../lexer.js' ;
12
+ import { isPunctuatorTokenKind , Lexer } from '../lexer.js' ;
17
13
import { Source } from '../source.js' ;
18
14
import { TokenKind } from '../tokenKind.js' ;
19
15
@@ -170,8 +166,8 @@ describe('Lexer', () => {
170
166
} ) ;
171
167
172
168
it ( 'reports unexpected characters' , ( ) => {
173
- expectSyntaxError ( '^ ' ) . to . deep . equal ( {
174
- message : 'Syntax Error: Unexpected character: "^ ".' ,
169
+ expectSyntaxError ( '. ' ) . to . deep . equal ( {
170
+ message : 'Syntax Error: Unexpected character: ". ".' ,
175
171
locations : [ { line : 1 , column : 1 } ] ,
176
172
} ) ;
177
173
} ) ;
@@ -969,13 +965,6 @@ describe('Lexer', () => {
969
965
value : undefined ,
970
966
} ) ;
971
967
972
- expect ( lexOne ( '.' ) ) . to . contain ( {
973
- kind : TokenKind . DOT ,
974
- start : 0 ,
975
- end : 1 ,
976
- value : undefined ,
977
- } ) ;
978
-
979
968
expect ( lexOne ( '...' ) ) . to . contain ( {
980
969
kind : TokenKind . SPREAD ,
981
970
start : 0 ,
@@ -1193,33 +1182,6 @@ describe('Lexer', () => {
1193
1182
} ) ;
1194
1183
} ) ;
1195
1184
1196
- describe ( 'SchemaCoordinateLexer' , ( ) => {
1197
- it ( 'can be stringified' , ( ) => {
1198
- const lexer = new SchemaCoordinateLexer ( new Source ( 'Name.field' ) ) ;
1199
- expect ( Object . prototype . toString . call ( lexer ) ) . to . equal (
1200
- '[object SchemaCoordinateLexer]' ,
1201
- ) ;
1202
- } ) ;
1203
-
1204
- it ( 'tracks a schema coordinate' , ( ) => {
1205
- const lexer = new SchemaCoordinateLexer ( new Source ( 'Name.field' ) ) ;
1206
- expect ( lexer . advance ( ) ) . to . contain ( {
1207
- kind : TokenKind . NAME ,
1208
- start : 0 ,
1209
- end : 4 ,
1210
- value : 'Name' ,
1211
- } ) ;
1212
- } ) ;
1213
-
1214
- it ( 'forbids ignored tokens' , ( ) => {
1215
- const lexer = new SchemaCoordinateLexer ( new Source ( '\nName.field' ) ) ;
1216
- expectToThrowJSON ( ( ) => lexer . advance ( ) ) . to . deep . equal ( {
1217
- message : 'Syntax Error: Invalid character: U+000A.' ,
1218
- locations : [ { line : 1 , column : 1 } ] ,
1219
- } ) ;
1220
- } ) ;
1221
- } ) ;
1222
-
1223
1185
describe ( 'isPunctuatorTokenKind' , ( ) => {
1224
1186
function isPunctuatorToken ( text : string ) {
1225
1187
return isPunctuatorTokenKind ( lexOne ( text ) . kind ) ;
0 commit comments