-
-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
test.each: Allow test name to not include every test arg #6342
Comments
Related: #6321 |
Strange I’ve not noticed this but I was using vsprint before instead of Node Util format I’d say this is definitely a bug. I’ll try and get this sorted ASAP |
@mattphillips That's awesome, thank you! Out of curiosity, why aren't you using sprintf? I took a look at the docs and it seems much more flexible than util.format. |
(in general, not this specifically. And I'm not opposed to switching, I didn't think about these edge cases when suggesting |
Gotcha. Thanks again! |
This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Regarding the
test.each
function:Right now when you provide a test name, the arguments to the test from
each
are appended to that name even if you don't provide any placeholders, due to the behavior of util.format. For example, the testwould run the tests "description of test foo" and "description of test bar". Sometimes this is not desirable. For example, if the test arguments are long strings this would bloat the output.
Could we come up with a better formatting mechanism that would allow users more control over this behavior?
The text was updated successfully, but these errors were encountered: