Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

Commit 13f50c3

Browse files
committed
add test for #466
1 parent 49ce2da commit 13f50c3

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

tests/lib/scope-analysis.js

+16
Original file line numberDiff line numberDiff line change
@@ -259,4 +259,20 @@ function bar(foo: any) {}
259259

260260
assert.deepStrictEqual(messages, []);
261261
});
262+
263+
test("https://github.com/eslint/typescript-eslint-parser/issues/466", () => {
264+
const code = `
265+
/*globals document, selector */
266+
const links = document.querySelectorAll( selector ) as NodeListOf<HTMLElement>
267+
`;
268+
const config = {
269+
parser: "typescript-eslint-parser",
270+
rules: {
271+
"no-undef": "error"
272+
}
273+
};
274+
const messages = linter.verify(code, config, { filename: "issue.ts" });
275+
276+
assert.deepStrictEqual(messages, []);
277+
});
262278
});

0 commit comments

Comments
 (0)