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

Remove embertest from ESLint configuration. #7553

Merged
merged 1 commit into from Jan 13, 2018

Conversation

rwjblue
Copy link
Member

@rwjblue rwjblue commented Jan 12, 2018

As of Ember 3.0 the new testing APIs introduced in emberjs/rfcs#232 and emberjs/rfcs#268 are enabled and used by default. In these APIs no globals are used, therefore this extra tests/ override is removed.

This specifically removes the following globals from being allowed:

  • andThen
  • click
  • currentPath
  • currentRouteName
  • currentURL
  • fillIn
  • find
  • findWithAssert
  • keyEvent
  • pauseTest
  • resumeTest
  • triggerEvent
  • visit
  • wait

As of Ember 3.0 the new testing APIs introduced in emberjs/rfcs#232 and
emberjs/rfcs#268 are enabled and used by default. In these APIs no
globals are used, therefore this extra `tests/` override is removed.

This specifically removes the following globals from being allowed:

* `andThen`
* `click`
* `currentPath`
* `currentRouteName`
* `currentURL`
* `fillIn`
* `find`
* `findWithAssert`
* `keyEvent`
* `pauseTest`
* `resumeTest`
* `triggerEvent`
* `visit`
* `wait`
@rwjblue rwjblue merged commit 5504295 into ember-cli:beta Jan 13, 2018
@rwjblue rwjblue deleted the remove-embertest branch January 13, 2018 04:45
@0xadada
Copy link

0xadada commented Jan 17, 2018

i love to see additional simplicity

@Turbo87
Copy link
Member

Turbo87 commented Jan 21, 2018

@rwjblue FYI find still seems to be included somehow. I have embertest disabled in one of our projects, but using global find is still not producing a warning somehow :-/

@rwjblue
Copy link
Member Author

rwjblue commented Jan 21, 2018

@Turbo87 what is that find? I do not think it’s Ember’s version...

@Turbo87
Copy link
Member

Turbo87 commented Jan 21, 2018

I don't know, the only thing I know is that global find does not seem to trigger ESLint for some unknown reason

@rwjblue
Copy link
Member Author

rwjblue commented Jan 21, 2018

If you log it to the console, then hover in the devtools it will show you the function source location and you can see where it’s coming from...

@Turbo87
Copy link
Member

Turbo87 commented Jan 21, 2018

I don't think find is actually available, but ESLint seems to think it would be an allowed global

@rwjblue
Copy link
Member Author

rwjblue commented Jan 21, 2018

@Turbo87
Copy link
Member

Turbo87 commented Jan 21, 2018

could well be. I guess it comes from https://github.com/sindresorhus/globals/blob/master/globals.json#L353

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants