diff --git a/src/language/__tests__/blockString-fuzz.js b/src/language/__tests__/blockString-fuzz.js index 3b285933e8..a8d0fd8940 100644 --- a/src/language/__tests__/blockString-fuzz.js +++ b/src/language/__tests__/blockString-fuzz.js @@ -10,10 +10,11 @@ import { Lexer } from '../lexer'; import { Source } from '../source'; import { printBlockString } from '../blockString'; -function lexValue(str: string) { +function lexValue(str: string): string { const lexer = new Lexer(new Source(str)); const value = lexer.advance().value; + invariant(typeof value === 'string'); invariant(lexer.advance().kind === '', 'Expected EOF'); return value; }