unexpected icon indicating copy to clipboard operation
unexpected copied to clipboard

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

Open dasilvacontin opened this issue 8 years ago • 2 comments

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?

dasilvacontin avatar May 05 '17 10:05 dasilvacontin

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.

sunesimonsen avatar Jan 06 '19 10:01 sunesimonsen

@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?

alexjeffburke avatar Dec 12 '19 13:12 alexjeffburke