-
Notifications
You must be signed in to change notification settings - Fork 475
remove deep-assign dependency #392
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
Simek
wants to merge
2
commits into
react-native-async-storage:master
from
Simek:remove-deep-assign-dependency
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
Since this is our own implementation, could you
export
this function (and write a comment that it's being exported for tests only) and write some tests? To make sure this works as expectedThere 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.
I had started working on the requested changes but it looks like there is already an own, native implementation of deep merge in the code:
Can this code be moved into main file? What is the best approach in this situation?
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.
Good catch, I forgot about that code there 😊 But this should not be a problem in that case - the
_deepMerge
function is used in Mock function. What I meant in my request was to write tests formerge
function only, to check if it properly merges objects together.I guess we could try to reuse
merge
in mock itself, but I'm not sure if that's good approach - themock
has no external (or even internal) dependencies, and I'd like to keep it that wayUh oh!
There was an error while loading. Please reload this page.
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.
I'm a little bit afraid that I don't fully understand your test plan or your testing approach. I happy to help with fixing the initial issue and the basic tests but don't want to spend a lot of time working on the full test suite for this change.
So there are three options I consider:
merge
as is and include/copy tests from thedeep-merge
package,Let me know what's your opinion about that.
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.
I'm okay with changing the dependency to something else (more tested and used), than having own implementation, so that we save time on writing proper implementation and tests.