@@ -168,36 +168,36 @@ describe('Lexer', () => {
168
168
it ( 'errors respect whitespace' , ( ) => {
169
169
let caughtError ;
170
170
try {
171
- lexOne ( [ '' , '' , ' ? ' , '' ] . join ( '\n' ) ) ;
171
+ lexOne ( [ '' , '' , ' ~ ' , '' ] . join ( '\n' ) ) ;
172
172
} catch ( error ) {
173
173
caughtError = error ;
174
174
}
175
175
expect ( String ( caughtError ) ) . to . equal ( dedent `
176
- Syntax Error: Unexpected character: "? ".
176
+ Syntax Error: Unexpected character: "~ ".
177
177
178
- GraphQL request:3:5
178
+ GraphQL request:3:2
179
179
2 |
180
- 3 | ?
181
- | ^
180
+ 3 | ~
181
+ | ^
182
182
4 |
183
183
` ) ;
184
184
} ) ;
185
185
186
186
it ( 'updates line numbers in error for file context' , ( ) => {
187
187
let caughtError ;
188
188
try {
189
- const str = [ '' , '' , ' ? ' , '' ] . join ( '\n' ) ;
189
+ const str = [ '' , '' , ' ~ ' , '' ] . join ( '\n' ) ;
190
190
const source = new Source ( str , 'foo.js' , { line : 11 , column : 12 } ) ;
191
191
new Lexer ( source ) . advance ( ) ;
192
192
} catch ( error ) {
193
193
caughtError = error ;
194
194
}
195
195
expect ( String ( caughtError ) ) . to . equal ( dedent `
196
- Syntax Error: Unexpected character: "? ".
196
+ Syntax Error: Unexpected character: "~ ".
197
197
198
198
foo.js:13:6
199
199
12 |
200
- 13 | ?
200
+ 13 | ~
201
201
| ^
202
202
14 |
203
203
` ) ;
@@ -206,16 +206,16 @@ describe('Lexer', () => {
206
206
it ( 'updates column numbers in error for file context' , ( ) => {
207
207
let caughtError ;
208
208
try {
209
- const source = new Source ( '? ' , 'foo.js' , { line : 1 , column : 5 } ) ;
209
+ const source = new Source ( '~ ' , 'foo.js' , { line : 1 , column : 5 } ) ;
210
210
new Lexer ( source ) . advance ( ) ;
211
211
} catch ( error ) {
212
212
caughtError = error ;
213
213
}
214
214
expect ( String ( caughtError ) ) . to . equal ( dedent `
215
- Syntax Error: Unexpected character: "? ".
215
+ Syntax Error: Unexpected character: "~ ".
216
216
217
217
foo.js:1:5
218
- 1 | ?
218
+ 1 | ~
219
219
| ^
220
220
` ) ;
221
221
} ) ;
@@ -1027,8 +1027,8 @@ describe('Lexer', () => {
1027
1027
locations : [ { line : 1 , column : 1 } ] ,
1028
1028
} ) ;
1029
1029
1030
- expectSyntaxError ( '? ' ) . to . deep . equal ( {
1031
- message : 'Syntax Error: Unexpected character: "? ".' ,
1030
+ expectSyntaxError ( '~ ' ) . to . deep . equal ( {
1031
+ message : 'Syntax Error: Unexpected character: "~ ".' ,
1032
1032
locations : [ { line : 1 , column : 1 } ] ,
1033
1033
} ) ;
1034
1034
0 commit comments