-
Notifications
You must be signed in to change notification settings - Fork 1
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
Allow a default message to be provided for a given pattern. #6
Conversation
This also cleans up the way we are passing arguments around a bit by changing the signature of |
This attaches the wrapper function to the assertion event. This can be used with Error.captureStackTrace(), to eliminate power-assert internals from the stack trace
@jamestalmage Thanks! And sorry for late response. Is there any place to be changed in README? |
Yeah, needs some docs. I am wondering if we shouldn't also just attach their entire original specification to the event, instead of copying over individual properties. That way they can attach arbitrary data specific to their own handlers |
That's what you've done in this pull-req, right? |
@@ -29,10 +30,11 @@ Decorator.prototype.enhancement = function () { | |||
var callSpec = { | |||
thisObj: that.receiver, | |||
func: that.receiver[methodName], | |||
numArgsToCapture: numberOfArgumentsToCapture(matcher), | |||
numArgsToCapture: numberOfArgumentsToCapture(matcherSpec), | |||
matcherSpec: matcherSpec, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've attached it here.
Now I understand and it sounds good to me ;) |
OK, |
Thanks and agreed. If you have any changes not pushed yet, would you update this pull-req? |
Sorry, I was working on a different branch and forgot. |
@jamestalmage looks good to me. Thank you for the great contribution! |
Allow a default message to be provided for a given pattern.
@jamestalmage Just released empower-core 0.3.0 🎉 I really appreciate your contributions. |
Thanks @twada - I will write up an AVA PR using it in a few days. Thanks for working with us on making |
See: avajs/ava#340 (comment)