@@ -221,7 +221,7 @@ describe('Schema Parser', () => {
221
221
222
222
it ( 'Extension without anything throws' , ( ) => {
223
223
expectSyntaxError ( 'extend type Hello' ) . to . deep . equal ( {
224
- message : 'Syntax Error: Unexpected <EOF>' ,
224
+ message : 'Syntax Error: Unexpected <EOF>. ' ,
225
225
locations : [ { line : 1 , column : 18 } ] ,
226
226
} ) ;
227
227
} ) ;
@@ -233,7 +233,7 @@ describe('Schema Parser', () => {
233
233
world: String
234
234
}
235
235
` ) . to . deep . equal ( {
236
- message : 'Syntax Error: Unexpected Name "extend"' ,
236
+ message : 'Syntax Error: Unexpected Name "extend". ' ,
237
237
locations : [ { line : 3 , column : 7 } ] ,
238
238
} ) ;
239
239
@@ -242,7 +242,7 @@ describe('Schema Parser', () => {
242
242
world: String
243
243
}
244
244
` ) . to . deep . equal ( {
245
- message : 'Syntax Error: Unexpected String "Description"' ,
245
+ message : 'Syntax Error: Unexpected String "Description". ' ,
246
246
locations : [ { line : 2 , column : 14 } ] ,
247
247
} ) ;
248
248
} ) ;
@@ -300,7 +300,7 @@ describe('Schema Parser', () => {
300
300
301
301
it ( 'Schema extension without anything throws' , ( ) => {
302
302
expectSyntaxError ( 'extend schema' ) . to . deep . equal ( {
303
- message : 'Syntax Error: Unexpected <EOF>' ,
303
+ message : 'Syntax Error: Unexpected <EOF>. ' ,
304
304
locations : [ { line : 1 , column : 14 } ] ,
305
305
} ) ;
306
306
} ) ;
@@ -724,28 +724,28 @@ describe('Schema Parser', () => {
724
724
725
725
it ( 'Union fails with no types' , ( ) => {
726
726
expectSyntaxError ( 'union Hello = |' ) . to . deep . equal ( {
727
- message : 'Syntax Error: Expected Name, found <EOF>' ,
727
+ message : 'Syntax Error: Expected Name, found <EOF>. ' ,
728
728
locations : [ { line : 1 , column : 16 } ] ,
729
729
} ) ;
730
730
} ) ;
731
731
732
732
it ( 'Union fails with leading double pipe' , ( ) => {
733
733
expectSyntaxError ( 'union Hello = || Wo | Rld' ) . to . deep . equal ( {
734
- message : 'Syntax Error: Expected Name, found | ' ,
734
+ message : 'Syntax Error: Expected Name, found "|". ' ,
735
735
locations : [ { line : 1 , column : 16 } ] ,
736
736
} ) ;
737
737
} ) ;
738
738
739
739
it ( 'Union fails with double pipe' , ( ) => {
740
740
expectSyntaxError ( 'union Hello = Wo || Rld' ) . to . deep . equal ( {
741
- message : 'Syntax Error: Expected Name, found | ' ,
741
+ message : 'Syntax Error: Expected Name, found "|". ' ,
742
742
locations : [ { line : 1 , column : 19 } ] ,
743
743
} ) ;
744
744
} ) ;
745
745
746
746
it ( 'Union fails with trailing pipe' , ( ) => {
747
747
expectSyntaxError ( 'union Hello = | Wo | Rld |' ) . to . deep . equal ( {
748
- message : 'Syntax Error: Expected Name, found <EOF>' ,
748
+ message : 'Syntax Error: Expected Name, found <EOF>. ' ,
749
749
locations : [ { line : 1 , column : 27 } ] ,
750
750
} ) ;
751
751
} ) ;
@@ -803,7 +803,7 @@ input Hello {
803
803
world(foo: Int): String
804
804
}
805
805
` ) . to . deep . equal ( {
806
- message : 'Syntax Error: Expected : , found ( ' ,
806
+ message : 'Syntax Error: Expected ":" , found "(". ' ,
807
807
locations : [ { line : 3 , column : 14 } ] ,
808
808
} ) ;
809
809
} ) ;
@@ -884,7 +884,7 @@ input Hello {
884
884
expectSyntaxError (
885
885
'directive @foo on FIELD | INCORRECT_LOCATION' ,
886
886
) . to . deep . equal ( {
887
- message : 'Syntax Error: Unexpected Name "INCORRECT_LOCATION"' ,
887
+ message : 'Syntax Error: Unexpected Name "INCORRECT_LOCATION". ' ,
888
888
locations : [ { line : 1 , column : 27 } ] ,
889
889
} ) ;
890
890
} ) ;
@@ -896,7 +896,7 @@ input Hello {
896
896
it ( 'Option: allowLegacySDLEmptyFields supports type with empty fields' , ( ) => {
897
897
const body = 'type Hello { }' ;
898
898
expectSyntaxError ( body ) . to . include ( {
899
- message : 'Syntax Error: Expected Name, found } ' ,
899
+ message : 'Syntax Error: Expected Name, found "}". ' ,
900
900
} ) ;
901
901
902
902
const doc = parse ( body , { allowLegacySDLEmptyFields : true } ) ;
@@ -906,7 +906,7 @@ input Hello {
906
906
it ( 'Option: allowLegacySDLImplementsInterfaces' , ( ) => {
907
907
const body = 'type Hello implements Wo rld { field: String }' ;
908
908
expectSyntaxError ( body ) . to . include ( {
909
- message : 'Syntax Error: Unexpected Name "rld"' ,
909
+ message : 'Syntax Error: Unexpected Name "rld". ' ,
910
910
} ) ;
911
911
912
912
const doc = parse ( body , { allowLegacySDLImplementsInterfaces : true } ) ;
0 commit comments