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

New rule: no-setupTest-from-ember-qunit #1845

Open
rwjblue opened this issue Apr 24, 2023 · 0 comments
Open

New rule: no-setupTest-from-ember-qunit #1845

rwjblue opened this issue Apr 24, 2023 · 0 comments
Labels
New Rule Idea for a new lint rule

Comments

@rwjblue
Copy link
Member

rwjblue commented Apr 24, 2023

As of ember-cli@4.3.0 emberjs/rfcs#637 has been implemented in the new application blueprint.

Once an addon or application has migrated to using the new re-exports from tests/helpers/index.js they should no longer import them from the classic ember-qunit locations.

Rule details:

  • Prevent importing setupTest, setupApplicationTest, and setupRenderingTest from the ember-qunit module
  • Consider attempting to write a fixer that will add a new import from app-name/helpers instead.

Bad:

import { setupTest } from 'ember-qunit';
import { setupRenderingTest } from 'ember-qunit';
import { setupApplicationTest } from 'ember-qunit'

(all of these should be forbidden)

Good:

import { setupTest } from 'app-name/helpers';
import { setupRenderingTest } from 'app-name/helpers';
import { setupApplicationTest } from 'app-name/helpers';
@rwjblue rwjblue added the New Rule Idea for a new lint rule label Apr 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
New Rule Idea for a new lint rule
Projects
None yet
Development

No branches or pull requests

1 participant