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

feat(assertion): Add typeof based matcher #91

Merged
merged 1 commit into from
Jul 24, 2023
Merged

Conversation

JoseLion
Copy link
Member

This PR adds a missing matcher on the Assertion base class based on the typeof operator

@JoseLion JoseLion self-assigned this Jul 21, 2023
* @param expected the expected data type
* @returns the assertion instance
*/
public toBeOfType(expected: DataType): this {
Copy link
Member Author

Choose a reason for hiding this comment

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

I'm not overly fond of the name of this method, so I'm open to suggestions 🙂

Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine. It reads naturally when used and it's pretty self explanatory. :)

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.

LGTM 👍

@JoseLion JoseLion merged commit 6e07131 into main Jul 24, 2023
@JoseLion JoseLion deleted the feat/typeof-matcher branch July 24, 2023 18:42
@github-actions
Copy link

🎉 This PR is included in version 1.3.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

2 participants