-
-
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
Strange tests titles on Node.js v12 #8443
Comments
Hmm this is strange, we are using I'd say this is potentially a bug in Node@12, I've just read over the @SimenB @thymikee @jeysal what do you guys think, should this be opened up in the node repo? |
@BridgeAR what do you think, is this a bug? I noticed nothing about it in the release notes for node 12 either |
This was an intentional change: nodejs/node#26927 I did not expect this change to cause any issues (passing through objects to the |
This makes sure that `util.format` uses `String` to stringify an object in case the object has an own property named `toString` with type `function`. That way objects that do not have such function are still inspected using `util.inspect` and the old behavior is preserved as well. PR-URL: nodejs#27621 Refs: jestjs/jest#8443 Reviewed-By: Roman Reiss <me@silverwind.io>
I just landed a PR in Node.js that should be included in the next version. It makes sure that |
Awesome, thanks! |
This makes sure that `util.format` uses `String` to stringify an object in case the object has an own property named `toString` with type `function`. That way objects that do not have such function are still inspected using `util.inspect` and the old behavior is preserved as well. PR-URL: #27621 Refs: jestjs/jest#8443 Reviewed-By: Roman Reiss <me@silverwind.io>
Guys thanks a lot! I've just rerunned tests and titles looks as they were before. I'm closing the issue. |
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. |
🐛 Bug Report
test.each
doesn't use test casetoString
for tests titles generation on Node.js v12 and produces titles like this:To Reproduce
Situation can be reproduced via executing such test on Node.js v12.
Expected behavior
Test title ought to be "Clear test title" as it is on Node.js v8 and v10.
Link to repl or repo (highly encouraged)
Test cases for which strange titles are generated:
https://github.com/litichevskiydv/JsUsefulPrimitives/blob/master/tests/manipulation/manipula.test.js
Build log for Node.js v10:
https://travis-ci.org/litichevskiydv/JsUsefulPrimitives/jobs/529938904
Build log for Node.js v12:
https://travis-ci.org/litichevskiydv/JsUsefulPrimitives/jobs/529938905
Run
npx envinfo --preset jest
Paste the results here:
The text was updated successfully, but these errors were encountered: