Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Adds option for recursively allowing additional props #1

Merged
merged 1 commit into from
Jan 12, 2022

Conversation

segphault
Copy link
Contributor

@segphault segphault commented Jan 12, 2022

This PR adds an option for recursively applying allowAdditionalProps, effectively making it possible to match on an object subset without having to splat any() on every single nested object.

Example:

assert.deepEquals(
  {foo: {bar: "baz", extra: true}, extra: true},
  {foo: {bar: "baz"}},
  {allowAdditionalProps: true})

I realize that this library hasn't been updated in awhile, so no worries if you aren't interested in accepting this. Feel free to close, I'm happy to just make a fork if that's easier.

@andywer
Copy link
Owner

andywer commented Jan 12, 2022

Hey @segphault, thanks for contributing!

Yeah, I guess that makes sense 👍

@andywer andywer merged commit 641d316 into andywer:master Jan 12, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants