Merge pull request babel/babel-eslint#128 from hzoo/i-124

add tests - for babel/babel-eslint#124
This commit is contained in:
Henry Zhu 2015-07-25 11:00:42 -04:00
parent 80888a1b23
commit d4318aa0d8
2 changed files with 46 additions and 0 deletions

View File

@ -265,6 +265,18 @@ describe("acorn-to-esprima", function () {
].join("\n"));
});
it("block comments #124", function () {
parseAndAssertSame([
"React.createClass({",
"render() {",
"// return (",
"// <div />",
"// ); // <-- this is the line that is reported",
"}",
"});"
].join("\n"));
});
it("null", function () {
parseAndAssertSame("null");
});

View File

@ -1238,4 +1238,38 @@ describe("verify", function () {
[]
);
});
// it("line comment space-in-parens #124", function () {
// verifyAndAssertMessages(
// [
// "React.createClass({",
// "render() {",
// "// return (",
// "// <div />",
// "// ); // <-- this is the line that is reported",
// "}",
// "});"
// ].join("\n"),
// { "space-in-parens": 1 },
// [ ]
// )
// });
it("block comment space-in-parens #124", function () {
verifyAndAssertMessages(
[
"React.createClass({",
"render() {",
"/*",
"return (",
" <div />",
"); // <-- this is the line that is reported",
"*/",
"}",
"});"
].join("\n"),
{ "space-in-parens": 1 },
[ ]
)
});
});