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
refactor: simplify some cases of common.formatQueryValue #1598
Conversation
@laumair Thanks so much for this contribution! It's great to have more help on #1404! @mastermatt Would you be up for giving this a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks for this! It looks good.
I've made a couple of small comments.
Also, since there are changes to the actual logic, I think this would fall into a refactor
instead of test
category. But I'm still getting use to Angular's commit style, so take that with a grain of salt 😄
This commit replaces the usage of Object.keys() with Object.entries() to address [this](nock#1598 (comment)) comment.
This commit addresses the following comments: 1- nock#1598 (comment) 2- nock#1598 (comment)
@mastermatt Thank you for the review.
I believe you are referring to the PR title because the branch name already has |
Travis is failing because of Prettier. |
@mastermatt Fixed with 6cffb89. |
The changes in I hesitate on approving the PR in general because of the tests and this comment #1588 (comment) @paulmelnikow @gr2m Should these tests be rewritten in terms of calls to |
This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related nock#1285
This commit simplifies array formatting by using Array.map instead of a plain for loop.
This commit adds unit test coverage for #formatQueryValue. Related nock#1404
This commit replaces the usage of Object.keys() with Object.entries() to address [this](nock#1598 (comment)) comment.
This commit addresses the following comments: 1- nock#1598 (comment) 2- nock#1598 (comment)
6cffb89
to
77ac326
Compare
I’ve rebased on latest master. Looking at the changes right now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Refactoring looks good to me 👍
I don’t think the tests add any more coverage though compared to latest beta
?
@gr2m is your recommendation to remove the new tests in this PR and merge just the |
Yes, since the tests are only unit tests any way, which could end up preventing us from removing dead code in the future |
…nto refactor/formatQueryValue
@gr2m @mastermatt Done! I have removed the unit tests. |
🎉 This PR is included in version 11.0.0-beta.24 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 11.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * chore: remove unnecessary formatting changes
* refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * chore: remove unnecessary formatting changes
* refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * refactor(common): replace lodash.forOwn with Array.reduce This commit replaces usage of lodash.forOwn with a combination of Object.keys() & Array.reduce. Related #1285 * refactor(commong): use Array.map This commit simplifies array formatting by using Array.map instead of a plain for loop. * test(common): add unit test coverage for #formatQueryValue This commit adds unit test coverage for #formatQueryValue. Related #1404 * chore: run prettier to fix lint errors * fix: use Object.entries() in favor of Object.keys() This commit replaces the usage of Object.keys() with Object.entries() to address [this](#1598 (comment)) comment. * test(common): break down tests This commit addresses the following comments: 1- #1598 (comment) 2- #1598 (comment) * chore: run prettier to fix lint errors * chore: remove unnecessary formatting changes
For #1404 & #1285.