Skip to content

Commit

Permalink
test: add spread syntax test
Browse files Browse the repository at this point in the history
  • Loading branch information
bmish committed Sep 7, 2020
1 parent ac0636f commit 4161757
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/lib/rules/no-attrs-in-components.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,13 @@ const { ERROR_MESSAGE } = rule;

const ruleTester = new RuleTester({
parserOptions: { ecmaVersion: 6, sourceType: 'module' },
parser: require.resolve('babel-eslint'),
});

ruleTester.run('no-attrs-in-components', rule, {
valid: [
"import Component from '@ember/component'; Component.extend({ init() { this.foo.bar; } });",
"import Component from '@ember/component'; Component.extend({ ...foo });",
"import Component from '@ember/component'; class MyComponent extends Component { init() { this.foo.bar; } }",
"import Component from '@glimmer/component'; class MyComponent extends Component { constructor() { this.foo.bar; } }",

Expand Down

0 comments on commit 4161757

Please sign in to comment.