diff options
author | Ruben Bridgewater <ruben@bridgewater.de> | 2019-03-26 15:53:11 +0100 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2019-04-04 12:48:57 +0200 |
commit | a9bf6652b5353f2098d4c0cd0eb77d17e02e164d (patch) | |
tree | 3c62cdca11156d359979e251883605aeee3b033e /test/parallel/test-http-response-statuscode.js | |
parent | adbcda1eef4377c6fd0c88a1df1003e1e100ffbe (diff) | |
download | node-new-a9bf6652b5353f2098d4c0cd0eb77d17e02e164d.tar.gz |
util: use minimal object inspection with %s specifier
This improves `util.format()` by returning more meaningful results
when using `%s` as specifier and any object as value. Besides that
`BigInt` will also be represented with an `n` at the end to indicate
that it's of type `BigInt`.
PR-URL: https://github.com/nodejs/node/pull/26927
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Diffstat (limited to 'test/parallel/test-http-response-statuscode.js')
-rw-r--r-- | test/parallel/test-http-response-statuscode.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/parallel/test-http-response-statuscode.js b/test/parallel/test-http-response-statuscode.js index 7e93ad10a9..680fa37cf6 100644 --- a/test/parallel/test-http-response-statuscode.js +++ b/test/parallel/test-http-response-statuscode.js @@ -29,7 +29,7 @@ const server = http.Server(common.mustCall(function(req, res) { test(res, NaN, 'NaN'); break; case 3: - test(res, {}, '[object Object]'); + test(res, {}, '{}'); break; case 4: test(res, 99, '99'); @@ -47,7 +47,7 @@ const server = http.Server(common.mustCall(function(req, res) { test(res, true, 'true'); break; case 9: - test(res, [], ''); + test(res, [], '[]'); break; case 10: test(res, 'this is not valid', 'this is not valid'); |