Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix using "group" option without a "testGenerator" #220

Closed

Conversation

esbanarango
Copy link

This PR fixes #213, by preventing to set group option to true if the testGenerator option is not set.

@Turbo87 Turbo87 changed the title Fix #213 Fix using "group" option without a "testGenerator" Oct 24, 2017
@@ -43,7 +43,7 @@ module.exports = {

return ESLint.create(tree, {
testGenerator: this.options.testGenerator || this._testGenerator,
group: (this.options.group !== false) ? type : undefined,
group: (this.options.testGenerator && this.options.group !== false) ? type : undefined,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this does not work if the test generator is detected automatically by this._testGenerator.

I guess the logic should be:

use group: type if:

  • group: true was explicitly specified
  • a testGenerator was specified or automatically detected that supports group (will have to build something like ESLint.supportsGrouping(testGeneratorName) into https://github.com/ember-cli/broccoli-lint-eslint)

and otherwise set the group option to undefined

@Turbo87
Copy link
Member

Turbo87 commented Nov 24, 2018

closing due to inactivity

@Turbo87 Turbo87 closed this Nov 24, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error: The "group" options can only be used with a "testGenerator" option of: qunit,mocha
2 participants