From cd0f5ccc93b02970f10f84c73ee7bf48f895cdb2 Mon Sep 17 00:00:00 2001 From: Henry Zhu Date: Sat, 15 Aug 2015 09:24:14 -0400 Subject: [PATCH] add older tests --- .../test/non-regression.js | 26 +++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/eslint/babel-eslint-parser/test/non-regression.js b/eslint/babel-eslint-parser/test/non-regression.js index 1dc559b8b1..688b08e87b 100644 --- a/eslint/babel-eslint-parser/test/non-regression.js +++ b/eslint/babel-eslint-parser/test/non-regression.js @@ -54,7 +54,9 @@ describe("verify", function () { it("Modules support (issue #5)", function () { verifyAndAssertMessages( "import Foo from 'foo';\n" + - "export default Foo;", + "export default Foo;\n" + + "export const c = 'c';\n" + + "export class Store {}", {}, [] ); @@ -125,6 +127,26 @@ describe("verify", function () { ); }); + it("arrow functions (issue #27)", function () { + verifyAndAssertMessages( + "[1, 2, 3].map(i => i * 2);", + { "func-names": 1, "space-before-blocks": 1 }, + [] + ); + }); + + it("comment with padded-blocks (issue #33)", function () { + verifyAndAssertMessages([ + "if (a){", + "// i'm a comment!", + "let b = c", + "}" + ].join("\n"), + { "padded-blocks": [1, "never"] }, + [] + ); + }); + describe("flow", function () { it("check regular function", function () { verifyAndAssertMessages([ @@ -967,7 +989,7 @@ describe("verify", function () { ); }); - it("class properties", function () { + it("class properties #71", function () { verifyAndAssertMessages( "class Lol { foo = 'bar'; }", { "no-undef": 1 },