-
Notifications
You must be signed in to change notification settings - Fork 2
feat(object): Add .toHave[Keys|Values|Entries] methods #93
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
Conversation
| * @param keys the keys the object should have | ||
| * @returns the assertion instance | ||
| */ | ||
| public toHaveKeys(...keys: Array<keyof T>): this { |
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.
Should we consider naming this something like "toExactlyHaveKeys" or similar to denote that it is an exact comparation?. I'm not sure about this though. Let me know what you think. :)
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.
Yeah, I thought about something similar, but it'd be a bit repetitive because we already have .toContainKeys, which are not exact. Also, I'd prefer keeping the names small and straightforward so they are easier to use and remember 🙂
Let's keep it this way for now, and we can add an alias later if we think it's necessary.
ChristianSama
left a comment
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.
Looks good to me! 👍 Just left a small question and a typo which should not be blockers
|
@all-contributors please add @ChristianSama for review |
|
I've put up a pull request to add @ChristianSama! 🎉 |
|
🎉 This PR is included in version 1.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
|
🎉 This PR is included in version 1.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Resolves #92