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

Commit

Permalink
add test for #435
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea committed Nov 8, 2018
1 parent 7ce5d61 commit ca4b08f
Showing 1 changed file with 21 additions and 3 deletions.
24 changes: 21 additions & 3 deletions tests/lib/scope-analysis.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,10 +172,10 @@ describe("TypeScript scope analysis", () => {
});
}

test("https://github.com/eslint/typescript-eslint-parser/issues/416", () => {
const linter = new Linter();
linter.defineParser("typescript-eslint-parser", parser);
const linter = new Linter();
linter.defineParser("typescript-eslint-parser", parser);

test("https://github.com/eslint/typescript-eslint-parser/issues/416", () => {
const code = `
export type SomeThing = {
id: string;
Expand All @@ -191,4 +191,22 @@ export type SomeThing = {

assert.deepStrictEqual(messages, []);
});

test("https://github.com/eslint/typescript-eslint-parser/issues/435", () => {
const code = `
interface Foo {
bar: string
}
const bar = 'blah'
`;
const config = {
parser: "typescript-eslint-parser",
rules: {
"no-use-before-define": "error"
}
};
const messages = linter.verify(code, config, { filename: "issue435.ts" });

assert.deepStrictEqual(messages, []);
});
});

0 comments on commit ca4b08f

Please sign in to comment.