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

fix(merge): ensure undefined is assigned when merging partial mock #748

Merged
merged 2 commits into from
May 22, 2021

Conversation

Pmyl
Copy link
Collaborator

@Pmyl Pmyl commented May 21, 2021

Thank you for your contribution to ts auto mock repo.
Before submitting this PR, please make sure:

  • Your code builds clean without any errors or warnings
  • You have added tests

lodash merge and mergeWith skip undefined by design, this doesn't match our requirement of applying the partial mock to the generated mock.
This PR updates the merge functionality to handle the case with undefined and fixes #746

@Pmyl Pmyl requested a review from uittorio May 21, 2021 22:48
Copy link
Member

@uittorio uittorio left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!!!

@uittorio uittorio merged commit 31c5ff5 into master May 22, 2021
@uittorio uittorio deleted the fix/ensure_undefined_is_merged_correctly branch May 22, 2021 09:53
@typescripttdd
Copy link
Collaborator

🎉 This PR is included in version 3.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

@C0ZEN
Copy link
Contributor

C0ZEN commented May 22, 2021

@Pmyl @uittorio thank you 🎉

@uittorio
Copy link
Member

@C0ZEN thank you for the contribution! We wouldnt find these bugs if no one uses these functionalities extensively!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hydrated mock with undefined object values as parameter
4 participants