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

adding spyOn to the list of globals for the eslint env jest/globals s… #3196

Merged
merged 2 commits into from
Mar 23, 2017

Conversation

shaunwallace
Copy link
Contributor

Summary

While using the eslint env jest/globals to whitelist the environment variables used within the spec files, the spyOn global was not being ignored as a global environmental variable.

{
  "extends":[
    "plugin:jest/recommended"
  ],
  "plugins": ["jest"],
  "env": {
    "jest/globals": true
  },
}

Test plan

No functional change, this only alters the eslint no-undef rule

@facebook-github-bot
Copy link
Contributor

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please sign up at https://code.facebook.com/cla - and if you have received this in error or have any questions, please drop us a line at cla@fb.com. Thanks!

If you are contributing on behalf of someone else (eg your employer): the individual CLA is not sufficient - use https://developers.facebook.com/opensource/cla?type=company instead. Contact cla@fb.com if you have any questions.

@facebook-github-bot
Copy link
Contributor

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Facebook open source project. Thanks!

@aaronabramov
Copy link
Contributor

aaronabramov commented Mar 23, 2017

@thymikee did we have plans to remove spyOn from global variables?
anyway, right now it is still in global so we should probably add it here

@aaronabramov aaronabramov merged commit b37cc7c into jestjs:master Mar 23, 2017
@codecov-io
Copy link

Codecov Report

Merging #3196 into master will not change coverage.
The diff coverage is n/a.

@@           Coverage Diff           @@
##           master    #3196   +/-   ##
=======================================
  Coverage   62.07%   62.07%           
=======================================
  Files         174      174           
  Lines        6547     6547           
  Branches        4        4           
=======================================
  Hits         4064     4064           
  Misses       2482     2482           
  Partials        1        1
Impacted Files Coverage Δ
packages/eslint-plugin-jest/src/index.js 100% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1a61f3f...c6d4074. Read the comment docs.

@cpojer
Copy link
Member

cpojer commented Mar 24, 2017

We will remove this global. We don't officially support it.

@shaunwallace
Copy link
Contributor Author

@cpojer @DmitriiAbramov are there any plans to document which globals, if there are any others, that the eslint-plugin-jest will not support and reasons as to why they are/aren't supported? Is this due to a change in jasmine or...?

@cpojer
Copy link
Member

cpojer commented Mar 25, 2017

We are diverging from Jasmine to build a better test runner. The current set of globals that is in our documentation is the only official interface. Anything else may change at any time.

aaronabramov pushed a commit to aaronabramov/jest that referenced this pull request Mar 25, 2017
aaronabramov added a commit that referenced this pull request Mar 25, 2017
skovhus pushed a commit to skovhus/jest that referenced this pull request Apr 29, 2017
jestjs#3196)

* adding spyOn to the list of globals for the eslint env jest/globals setting

* reorder spyOn environmental global based on ascending order rule
skovhus pushed a commit to skovhus/jest that referenced this pull request Apr 29, 2017
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
jestjs#3196)

* adding spyOn to the list of globals for the eslint env jest/globals setting

* reorder spyOn environmental global based on ascending order rule
tushardhole pushed a commit to tushardhole/jest that referenced this pull request Aug 21, 2017
@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants