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

Commit 6e70971

Browse files
committed
add test for #487
1 parent 180cbfe commit 6e70971

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

tests/lib/scope-analysis.js

+20
Original file line numberDiff line numberDiff line change
@@ -292,4 +292,24 @@ class X {
292292

293293
assert.deepStrictEqual(messages, []);
294294
});
295+
296+
test("https://github.com/eslint/typescript-eslint-parser/issues/487", () => {
297+
const code = `
298+
export default class Test {
299+
private status: string;
300+
getStatus() {
301+
return this.status;
302+
}
303+
}
304+
`;
305+
const config = {
306+
parser: "typescript-eslint-parser",
307+
rules: {
308+
"no-restricted-globals": ["error", "status"]
309+
}
310+
};
311+
const messages = linter.verify(code, config, { filename: "issue.ts" });
312+
313+
assert.deepStrictEqual(messages, []);
314+
});
295315
});

0 commit comments

Comments
 (0)