File tree Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Expand file tree Collapse file tree 1 file changed +9
-7
lines changed Original file line number Diff line number Diff line change @@ -101,12 +101,13 @@ describe('Lexer', () => {
101
101
} ) ;
102
102
103
103
it ( 'errors respect whitespace' , ( ) => {
104
- const str = '' +
105
- '\n' +
106
- '\n' +
107
- ' ?\n' +
108
- '\n' ;
109
- expect ( ( ) => lexOne ( str )
104
+
105
+ expect ( ( ) => lexOne ( `
106
+
107
+ ?
108
+
109
+
110
+ ` )
110
111
) . to . throw (
111
112
'Syntax Error GraphQL request (3:5) ' +
112
113
'Cannot parse the unexpected character "?".\n' +
@@ -116,6 +117,7 @@ describe('Lexer', () => {
116
117
' ^\n' +
117
118
'4: \n'
118
119
) ;
120
+
119
121
} ) ;
120
122
121
123
it ( 'updates line numbers in error for file context' , ( ) => {
@@ -126,7 +128,7 @@ describe('Lexer', () => {
126
128
' ?\n' +
127
129
'\n' ;
128
130
const source = new Source ( str , 'foo.js' , { line : 11 , column : 0 } ) ;
129
- return createLexer ( source ) . advance ( )
131
+ return createLexer ( source ) . advance ( ) ;
130
132
} ) . to . throw (
131
133
'Syntax Error foo.js (13:5) ' +
132
134
'Cannot parse the unexpected character "?".\n' +
You can’t perform that action at this time.
0 commit comments