Skip to content

Commit

Permalink
Chore: add tests for generator-star-spacing and async (refs #7101) (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mysticatea authored and nzakas committed Sep 19, 2016
1 parent c118d21 commit 2d10657
Showing 1 changed file with 26 additions and 1 deletion.
27 changes: 26 additions & 1 deletion tests/lib/rules/generator-star-spacing.js
Original file line number Diff line number Diff line change
Expand Up @@ -517,8 +517,33 @@ ruleTester.run("generator-star-spacing", rule, {
code: "class Foo { static*foo(){} }",
options: [{before: false, after: false}],
parserOptions: { ecmaVersion: 6 }
}
},

// https://github.com/eslint/eslint/issues/7101#issuecomment-246080531
{
code: "async function foo() { }",
parserOptions: { ecmaVersion: 8 }
},
{
code: "(async function() { })",
parserOptions: { ecmaVersion: 8 }
},
{
code: "async () => { }",
parserOptions: { ecmaVersion: 8 }
},
{
code: "({async foo() { }})",
parserOptions: { ecmaVersion: 8 }
},
{
code: "class A {async foo() { }}",
parserOptions: { ecmaVersion: 8 }
},
{
code: "(class {async foo() { }})",
parserOptions: { ecmaVersion: 8 }
},
],

invalid: [
Expand Down

0 comments on commit 2d10657

Please sign in to comment.