Remove variable shadowing from the JavaScript files in the test/unit/ folder

*This is part of a series of patches that will try to split PR 11566 into smaller chunks, to make reviewing more feasible.*

Once all the code has been fixed, we'll be able to eventually enable the ESLint no-shadow rule; see https://eslint.org/docs/rules/no-shadow
This commit is contained in:
Jonas Jenwald 2020-03-24 10:44:17 +01:00
parent 85838fc505
commit 66ee8f5acd
3 changed files with 96 additions and 86 deletions

View file

@ -159,11 +159,11 @@ describe("parser", function() {
const numbers = ["..", "-.", "+.", "-\r\n.", "+\r\n."];
for (const number of numbers) {
const input = new StringStream(number);
const lexer = new Lexer(input);
const invalidInput = new StringStream(number);
const invalidLexer = new Lexer(invalidInput);
expect(function() {
return lexer.getNumber();
return invalidLexer.getNumber();
}).toThrowError(FormatError, /^Invalid number:\s/);
}
});