Add a test for use strict and directive ast change
Fixes babel/babel-eslint#242
This commit is contained in:
parent
167741b80b
commit
177c0b4979
@ -138,8 +138,7 @@ describe("verify", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
// fix after updating to ESLint 1.0.0
|
it("Arrow function with non-block bodies (issue #20)", function () {
|
||||||
it.skip("Arrow function with non-block bodies (issue #20)", function () {
|
|
||||||
verifyAndAssertMessages(
|
verifyAndAssertMessages(
|
||||||
"\"use strict\"; () => 1",
|
"\"use strict\"; () => 1",
|
||||||
{ "strict": [1, "global"] },
|
{ "strict": [1, "global"] },
|
||||||
@ -148,6 +147,15 @@ describe("verify", function () {
|
|||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it("#242", function () {
|
||||||
|
verifyAndAssertMessages(
|
||||||
|
"\"use strict\"; asdf;",
|
||||||
|
{ "no-irregular-whitespace": 1 },
|
||||||
|
[],
|
||||||
|
{}
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
it("await keyword (issue #22)", function () {
|
it("await keyword (issue #22)", function () {
|
||||||
verifyAndAssertMessages(
|
verifyAndAssertMessages(
|
||||||
"async function foo() { await bar(); }",
|
"async function foo() { await bar(); }",
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user