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

Jasmine matchers feature parity #8681

Closed
AmyBlankenship opened this issue Jul 12, 2019 · 5 comments
Closed

Jasmine matchers feature parity #8681

AmyBlankenship opened this issue Jul 12, 2019 · 5 comments

Comments

@AmyBlankenship
Copy link

🚀 Feature Proposal

Use output from second parameter in matchers like in Jasmine.

Motivation

This lets me write efficient code but still know exactly which object had a mismatch.

Example

In Jasmine, I can do something like this:
for (var i=0, i<myObjects.length; i++) {
myObj = myObjects[i];
expect myObj.someprop.toEqual(1, index + ' ' + myObj.name);
}

Pitch

You're using Jasmine under the hood anyway--why would you make your matchers so much less capable than theirs?

@SimenB
Copy link
Member

SimenB commented Jul 12, 2019

Duplicate of #3293


You're using Jasmine under the hood anyway--why would you make your matchers so much less capable than theirs?

We don't use jasmine's matchers

@SimenB SimenB closed this as completed Jul 12, 2019
@AmyBlankenship
Copy link
Author

Is there a way to use them with expect? Or could you fix yours to work better?

@SimenB
Copy link
Member

SimenB commented Jul 12, 2019

No, they're not pluggable. You can use chai or the linked jest-expect-message, though

@AmyBlankenship
Copy link
Author

Could you just fix yours?

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 11, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants