Skip to content

Commit d1c83e0

Browse files
authored
Fix typo in the error message for max tokens (#3748)
1 parent bd5aae7 commit d1c83e0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/language/__tests__/parser-test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,16 +91,16 @@ describe('Parser', () => {
9191
`);
9292
});
9393

94-
it('limit maximum number of tokens', () => {
94+
it('limits by a maximum number of tokens', () => {
9595
expect(() => parse('{ foo }', { maxTokens: 3 })).to.not.throw();
9696
expect(() => parse('{ foo }', { maxTokens: 2 })).to.throw(
97-
'Syntax Error: Document contains more that 2 tokens. Parsing aborted.',
97+
'Syntax Error: Document contains more than 2 tokens. Parsing aborted.',
9898
);
9999

100100
expect(() => parse('{ foo(bar: "baz") }', { maxTokens: 8 })).to.not.throw();
101101

102102
expect(() => parse('{ foo(bar: "baz") }', { maxTokens: 7 })).to.throw(
103-
'Syntax Error: Document contains more that 7 tokens. Parsing aborted.',
103+
'Syntax Error: Document contains more than 7 tokens. Parsing aborted.',
104104
);
105105
});
106106

src/language/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1638,7 +1638,7 @@ export class Parser {
16381638
throw syntaxError(
16391639
this._lexer.source,
16401640
token.start,
1641-
`Document contains more that ${maxTokens} tokens. Parsing aborted.`,
1641+
`Document contains more than ${maxTokens} tokens. Parsing aborted.`,
16421642
);
16431643
}
16441644
}

0 commit comments

Comments
 (0)