mirror of
https://github.com/denoland/deno.git
synced 2025-09-27 04:39:10 +00:00
Fix console.table display of Map and move tests to unit test (#1839)
This commit is contained in:
parent
ce5d5c5133
commit
c66d043ac6
11 changed files with 281 additions and 152 deletions
|
@ -581,8 +581,8 @@ export class Console {
|
|||
table = (data: unknown, properties?: string[]): void => {
|
||||
if (properties !== undefined && !Array.isArray(properties)) {
|
||||
throw new Error(
|
||||
"The 'properties' argument must be of type Array\
|
||||
. Received type string"
|
||||
"The 'properties' argument must be of type Array. " +
|
||||
"Received type string"
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -615,7 +615,7 @@ export class Console {
|
|||
let idx = 0;
|
||||
resultData = {};
|
||||
|
||||
data.forEach((k: unknown, v: unknown) => {
|
||||
data.forEach((v: unknown, k: unknown) => {
|
||||
resultData[idx] = { Key: k, Values: v };
|
||||
idx++;
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue