diff options
author | ohbarye <over.rye@gmail.com> | 2018-05-12 02:26:28 +0900 |
---|---|---|
committer | Ruben Bridgewater <ruben@bridgewater.de> | 2018-05-18 15:53:06 +0200 |
commit | 0c852a1795c0f5886c5bf5e8fa20e76456e78222 (patch) | |
tree | f507b9198198a3fe240f4df929c4cad35d808c69 /test | |
parent | 60cc8ff096c98c3bfd5c4906ac9af3e9c220a748 (diff) | |
download | android-node-v8-0c852a1795c0f5886c5bf5e8fa20e76456e78222.tar.gz android-node-v8-0c852a1795c0f5886c5bf5e8fa20e76456e78222.tar.bz2 android-node-v8-0c852a1795c0f5886c5bf5e8fa20e76456e78222.zip |
console: .table fall back to logging for function too
According to the console.table documentation, it reads that it "falls
back to just logging the argument if it can’t be parsed as tabular."
But it doesn't fall back when I give a function as its first argument.
It logs an empty table. This is fixes by this commit.
PR-URL: https://github.com/nodejs/node/pull/20681
Fixes: https://github.com/nodejs/node/issues/20679
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/parallel/test-console-table.js | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/test/parallel/test-console-table.js b/test/parallel/test-console-table.js index 64e2533f17..2b63556aca 100644 --- a/test/parallel/test-console-table.js +++ b/test/parallel/test-console-table.js @@ -29,6 +29,7 @@ test(undefined, 'undefined\n'); test(false, 'false\n'); test('hi', 'hi\n'); test(Symbol(), 'Symbol()\n'); +test(function() {}, '[Function]\n'); test([1, 2, 3], ` ┌─────────┬────────┐ |