From 0cb35ab04e8a2a5d5c223a16dbe3311803b39978 Mon Sep 17 00:00:00 2001 From: Daniel Tschinder Date: Sun, 10 Jul 2016 23:47:44 +0200 Subject: [PATCH] Fix tests for eslint 3.0 Seems that eslint got a lot smarter and reports vars that are used, but are useless as unused These examples are also failing with espree --- eslint/babel-eslint-parser/test/non-regression.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eslint/babel-eslint-parser/test/non-regression.js b/eslint/babel-eslint-parser/test/non-regression.js index 1aca7343ce..17bd277fed 100644 --- a/eslint/babel-eslint-parser/test/non-regression.js +++ b/eslint/babel-eslint-parser/test/non-regression.js @@ -174,7 +174,7 @@ describe("verify", function () { describe("flow", function () { it("check regular function", function () { verifyAndAssertMessages([ - "function a(b, c) { b += 1; c += 1; } a;", + "function a(b, c) { b += 1; c += 1; return b + c; } a;", ].join("\n"), { "no-unused-vars": 1, "no-undef": 1 }, [] @@ -389,7 +389,7 @@ describe("verify", function () { it("polymorphpic/generic types for type alias #123", function () { verifyAndAssertMessages([ "import Bar from './Bar';", - "type Foo = Bar; var x: Foo = 1; x++" + "type Foo = Bar; var x: Foo = 1; console.log(x);" ].join("\n"), { "no-unused-vars": 1, "no-undef": 1 }, []