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

Chore: Add object-property-newline tests to increase coverage. #9553

Merged
merged 1 commit into from Nov 1, 2017
Merged

Chore: Add object-property-newline tests to increase coverage. #9553

merged 1 commit into from Nov 1, 2017

Conversation

jrpool
Copy link
Contributor

@jrpool jrpool commented Oct 31, 2017

What is the purpose of this pull request? (put an "X" next to item)

[ ] Documentation update
[ ] Bug fix (template)
[ ] New rule (template)
[ ] Changes an existing rule (template)
[ ] Add autofixing to a rule
[ ] Add a CLI option
[ ] Add something to the core
[X] Other, please explain:
Add tests to an existing rule

What changes did you make? (Give an overview)
Added tests for some code patterns not already tested for.

Is there anything you'd like reviewers to focus on?
I would appreciate guidance on whether I am responsible for doing something about changes in package.json when I submit pull requests.

@platinumazure
Copy link
Member

I'm curious, why did package.json change? Did you need to update anything in order for this change to run/test successfully?

Usually, we'll occasionally go through package.json and upgrade dependencies as separate PRs. It's good for PRs to focus on one thing, if possible. So if the dependency upgrade (package.json change) was necessary as part of the main purpose of the PR, then it makes sense to be included (indeed, it must be included); if the changes aren't necessary, it's probably better to do them separately.

@jrpool
Copy link
Contributor Author

jrpool commented Oct 31, 2017

@platinumazure: I suddenly found it impossible to perform npm test. I didn’t keep a copy of the error messages, but they indicated that the code could not be found to run the script at all. So I ran npm install. That worked, except that I got 2 warnings about needing to install versions of ESLint as (something like) codependencies. So I installed ESLint globally. After that, npm install returned no warnings and testing became possible as before. Intuitively, anyway, it seemed to me that at least some of the updates reflected in package.json changes were necessary in order for testing to take place at all.

@not-an-aardvark not-an-aardvark added the chore This change is not user-facing label Oct 31, 2017
@not-an-aardvark
Copy link
Member

Thanks for the PR!

I think it's unlikely that the changes to package.json in this PR had an effect; from your description, I think it's more likely that there was an issue with your local configuration which caused npm test to fail for some reason.

The two peerDependencies warnings that you mentioned are known, but they shouldn't affect running the tests in this case.

If it's true that other tests are currently failing on master without these package.json changes, then ideally we'd like to fix that independently from the object-property-newline tests that were also added in this PR.

@jrpool
Copy link
Contributor Author

jrpool commented Oct 31, 2017

Thanks for the help, @not-an-aardvark. I have restored the upstream master version of package.json and reinstalled packages accordingly. The tests now run and pass. So this PR now has changes only in tests/lib/rules/object-property-newline.js.

@ilyavolodin
Copy link
Member

Thanks for PR!

@ilyavolodin ilyavolodin merged commit 88d2303 into eslint:master Nov 1, 2017
@jrpool jrpool deleted the opnl-test-coverage branch November 1, 2017 21:36
@eslint-deprecated eslint-deprecated bot locked and limited conversation to collaborators May 1, 2018
@eslint-deprecated eslint-deprecated bot added the archived due to age This issue has been archived; please open a new issue for any further discussion label May 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
archived due to age This issue has been archived; please open a new issue for any further discussion chore This change is not user-facing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants