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

List 'to satisfy' under 'object' in 'Assertions' #393

Open
dasilvacontin opened this issue May 5, 2017 · 2 comments
Open

List 'to satisfy' under 'object' in 'Assertions' #393

dasilvacontin opened this issue May 5, 2017 · 2 comments

Comments

@dasilvacontin
Copy link

http://unexpected.js.org/assertions/object/

I was trying to find how to compare two objects, which apparently is using to satisfy. It took me a while to find that assertion since it was not listed under object. Thoughts?

@sunesimonsen
Copy link
Member

It is a bit complicated. I definitely appreciate the problem you are highlighting, but it would have to be done automatically instead of special cased. So what you basically suggest is to show all of the assertions that can work on a particular type. The problem with this approach is that we have so many assertions that this approach might also be confusing. It would make it hard to find assertions that works on numbers as they would be mixed with the assertion for the any type.

But maybe we could make the use capable of toggling inherited assertions in the doc page.

@alexjeffburke
Copy link
Member

@sunesimonsen could we alter the algorithm that processes assertions in the docs generator? What I was thinking is, for the list of available types, assertions we find supporting 'any' we put in a special array. Once the "by type" bit is done, we go back over the any list and add the listed 'any' assertions to each other?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants