Skip to content

Conversation

@JoseLion
Copy link
Contributor

Resolves #92

@JoseLion JoseLion requested a review from ChristianSama July 27, 2023 00:08
@JoseLion JoseLion self-assigned this Jul 27, 2023
* @param keys the keys the object should have
* @returns the assertion instance
*/
public toHaveKeys(...keys: Array<keyof T>): this {
Copy link
Contributor

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. :)

Copy link
Contributor Author

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.

Copy link
Contributor

@ChristianSama ChristianSama left a 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

@JoseLion JoseLion merged commit 97425dd into main Jul 28, 2023
@JoseLion JoseLion deleted the feat/to-have-methods branch July 28, 2023 17:52
@JoseLion
Copy link
Contributor Author

@all-contributors please add @ChristianSama for review

@allcontributors
Copy link
Contributor

@JoseLion

I've put up a pull request to add @ChristianSama! 🎉

@github-actions
Copy link

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions
Copy link

🎉 This PR is included in version 1.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

[ObjectAssertion] Missing .toHave[Keys|Values|Entries] methods

3 participants