Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.
Sign updocs(addAssertion): document alternations, flags and optional values #668
Conversation
This comment has been minimized.
This comment has been minimized.
Thanks for improving this, I'll review this soon. |
This comment has been minimized.
This comment has been minimized.
I just read through the updated documentation and I think it is a great improvement. So when we get the tests passing and @papandreou blessing then I think we should run with it. |
Great initiative, makes it much easier to understand! |
This comment has been minimized.
This comment has been minimized.
Thank you for the review @papandreou and @sunesimonsen. This is ready for a second pass |
This comment has been minimized.
This comment has been minimized.
Fwiw I also think this is awesome, thanks for taking this on @joelmukuthu |
I’ve now had the chance to read the text top to bottom - again, really cool taking on docs :) I’ve left a few specific comments inline, but I still think we need to address the “handler” thing. My suggestion now is to avoid the use of the term handler. I think this could be achieved by saying early on that: “The function we supply as the second argument to addAssertion is a handler that defines the body of the assertion..” and then later in the document refer to “assertion body”. That make use of terms we’ve generally used for this, but also avoids what to me is a very overloaded word in node. Finally, I think somewhere we do need to mention that if a promise is returned inside the assertion body that unexpected will wait for it allowing support for asynchronous assertions. |
This comment has been minimized.
This comment has been minimized.
Thanks for the review @alexjeffburke. I've replied to some of your comments seeking clarification. Regarding async assertions, there's a section further down on the same page talking about it. My idea with this rewrite was to build up from a simple example and avoid swamping the reader with too much information in one go. Regarding the word "handler", just to be sure, you'd like for me to use "assertion body" in its place instead? |
This comment has been minimized.
This comment has been minimized.
FYI, the "fun with flags" reference https://www.youtube.com/watch?v=LeyofQK6tRw :) EDIT: Actually this, where it all began https://www.youtube.com/watch?v=Xl12Sp1KiEk |
I really like this version |
Great! The node.js 6 build is failing because of the use of |
This comment has been minimized.
This comment has been minimized.
Great, thanks for the reviews! I slinkied my way around the Node 6 build and will squash and merge after a successful build. |
This comment has been minimized.
This comment has been minimized.
Someone remind me, how do I update the docs site? Or anyone mind doing it? |
This comment has been minimized.
This comment has been minimized.
|
This comment has been minimized.
This comment has been minimized.
Thank you @papandreou. All published. |
joelmukuthu commentedNov 20, 2019
No description provided.