-
Notifications
You must be signed in to change notification settings - Fork 1.4k
[Exploratory] Capture good assertion messages. #340
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
[Exploratory] Capture good assertion messages. #340
Conversation
👍 The less custom code in AVA dealing with this the better :) |
@twada ⬆️ Any thoughts? |
@sindresorhus @jamestalmage Sorry for my late response. I'm a little busy these days.
Sure! Please send a pull-req to For wrapOnlyPatterns: [
{
pattern: 't.throws(fn, [message])',
defaultMessage: 'should throw'
},
{
pattern: 't.doesNotThrow(fn, [message]',
defaultMessage: 'should not throw'
}
] to wrapOnlyPatterns: {
't.throws(fn, [message])': {
defaultMessage: 'should throw'
},
't.doesNotThrow(fn, [message]': {
defaultMessage: 'should not throw'
}
} |
@jamestalmage Can this be resolved now that |
Yep. Relevant changes to |
Sorry about pinging you all over the place @jamestalmage, but trying to clean up some long-running PR/issues. What's the next step with this PR? Not saying it should be fixed right now. Just would be useful to know the path forward. |
No worries! The issue here would be building up TAP output that would actually show these assertion messages. I think I would like to get a couple other things done first:
|
Thanks for the update. Solid plan.
Tape uses
Awesome that we can share some code with Let us know if there's anything @vdemedes and I can help with. Even if it's just feedback on any of those modules. |
Yeah sure - I'll file a couple issues on |
RE: Neither is technically "right". The contents of TAPs yaml output is completely unspecified as far as I know. As I recall the fancy mocha style diffs only print when using |
It's confusing. The v14 draft has examples with both wanted/found and expected/got and expect/got. // @isaacs |
Should we track the remaining work in some issues rather than this PR? |
@jamestalmage perhaps you could open issues to track remaining work, and then close this PR? |
Closing as this will never be merged and remaining todo's are tracked in #723 |
This just is a quick spike exploring the best way to capture assertion messages.
The only place this does not work great is for
wrapOnlyPatterns
, since you can end up with a situation wherepowerAssertContext
does not exist even though theargs
has elements that do notstringify
well.@twada - What do you think about moving this logic into
empower-core
? Auto populatingevent.computedMessage
or similar?Maybe we can offer a standard way to map
wrapOnlyPatterns
to messages?