You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I (probably) wouldn't block it, but I think the first example is clear. I think the proposed API results in code where it is not immediately obvious what is going on. So someone will have to go and read the documentation, which increases friction.
If anything, in the first example, I might avoid common.expectsError() and use one or more calls to assert.strictEqual() instead. The test code will be longer, but it will be clearer. No one will have to learn our common.expectsError() function to understand the test.
Activity
[-]test: proposal common.expectsError tick[/-][+]test: proposal common.expectsError nextTick option[/+]Trott commentedon Sep 28, 2019
I (probably) wouldn't block it, but I think the first example is clear. I think the proposed API results in code where it is not immediately obvious what is going on. So someone will have to go and read the documentation, which increases friction.
If anything, in the first example, I might avoid
common.expectsError()and use one or more calls toassert.strictEqual()instead. The test code will be longer, but it will be clearer. No one will have to learn ourcommon.expectsError()function to understand the test.cjihrig commentedon Sep 28, 2019
I share @Trott's opinion on this issue.
I'd actually like to see
common.expectsError()go away completely, but that's not the topic of this issue 😄ronag commentedon Sep 28, 2019
Makes sense.