Skip to content

improve test code #6644

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

Closed
wants to merge 1 commit into from
Closed

Conversation

sunshineo
Copy link
Contributor

  1. proper name to describe what the test does
  2. remove creation of extra Parse server instance
  3. remove the strange file of rest routes for testing
  4. use async await

Only the first test in ParseAPI.spec.js was changed, other changes in the file due to eslint
Only removed line 150 in helper.js, other changes in the file due to eslint

1. proper name to describe what the test does
2. remove creation of extra Parse server instance
3. remove the strange file of rest routes for testing
4. use async await
@sunshineo
Copy link
Contributor Author

The test failure on travis has nothing to do with my change. All tests passed locally

@davimacedo
Copy link
Member

I'm not sure if we should remove it yet. @dplewis @acinader thoughts?

@codecov
Copy link

codecov bot commented Apr 30, 2020

Codecov Report

Merging #6644 into master will increase coverage by 10.24%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff             @@
##           master    #6644       +/-   ##
===========================================
+ Coverage   83.74%   93.99%   +10.24%     
===========================================
  Files         169      169               
  Lines       11991    12601      +610     
===========================================
+ Hits        10042    11844     +1802     
+ Misses       1949      757     -1192     
Impacted Files Coverage Δ
src/Adapters/Storage/Mongo/MongoStorageAdapter.js 92.85% <0.00%> (-0.67%) ⬇️
src/Adapters/Cache/RedisCacheAdapter/index.js 97.33% <0.00%> (-0.63%) ⬇️
src/ParseServer.js 91.06% <0.00%> (-0.01%) ⬇️
src/Routers/AggregateRouter.js 100.00% <0.00%> (ø)
src/GraphQL/transformers/mutation.js 96.89% <0.00%> (+0.19%) ⬆️
src/GraphQL/loaders/defaultGraphQLTypes.js 97.43% <0.00%> (+0.36%) ⬆️
src/triggers.js 93.18% <0.00%> (+0.37%) ⬆️
src/Routers/UsersRouter.js 94.33% <0.00%> (+0.62%) ⬆️
src/RestWrite.js 94.44% <0.00%> (+0.79%) ⬆️
src/Controllers/UserController.js 94.39% <0.00%> (+0.93%) ⬆️
... and 3 more

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 f43afc5...20aa747. Read the comment docs.

@sunshineo
Copy link
Contributor Author

@davimacedo Sounds like there are some stories?

@dplewis
Copy link
Member

dplewis commented Apr 30, 2020

Does it actually create an extra parse server instance? Looks like it would only be created when you call the rest_create_app endpoint (only used in the tests you changed).

The file could have value in the future.

@acinader
Copy link
Contributor

acinader commented Apr 30, 2020

I don't have an opinion and will happily defer to your judgment.

It would be helpful in the future to break a change like this into two commits: 1. to apply current lint rules 2. the change itself.

@sunshineo
Copy link
Contributor Author

@acinader that is a good idea, I can try that later this weekend

@dplewis dplewis mentioned this pull request Jan 13, 2021
8 tasks
@dplewis
Copy link
Member

dplewis commented Jan 13, 2021

Superced by #7121

@sunshineo Thanks for finding this. I spend hours on tests just to find this.

@dplewis dplewis closed this Jan 13, 2021
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.

4 participants