add older tests

This commit is contained in:
Henry Zhu 2015-08-15 09:24:14 -04:00
parent 6476a8d916
commit cd0f5ccc93

View File

@ -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 },