diff options
author | sigmaSd <bedisnbiba@gmail.com> | 2022-10-10 15:22:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-10 10:22:21 -0400 |
commit | 70ad6717dfd1af57693e48e99a2f2e05f05c14eb (patch) | |
tree | ae42a7208ff0986d37270612d80e115cfd4e9618 /cli/tests/unit/console_test.ts | |
parent | 1ab3691b091e34ffa5a0b8f2cd18a87da8c4930c (diff) |
fix sparse array inspection (#16204)
fix https://github.com/denoland/deno/issues/16202
Diffstat (limited to 'cli/tests/unit/console_test.ts')
-rw-r--r-- | cli/tests/unit/console_test.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/cli/tests/unit/console_test.ts b/cli/tests/unit/console_test.ts index 0ab2829fc..2fdb23a40 100644 --- a/cli/tests/unit/console_test.ts +++ b/cli/tests/unit/console_test.ts @@ -770,6 +770,16 @@ Deno.test(function consoleTestStringifyIterable() { `[ <1 empty item> ]`, ); + assertEquals( + stringify([, , 1]), + `[ <2 empty items>, 1 ]`, + ); + + assertEquals( + stringify([1, , , 1]), + `[ 1, <2 empty items>, 1 ]`, + ); + const withEmptyElAndMoreItems = Array(500); withEmptyElAndMoreItems.fill(0, 50, 80); withEmptyElAndMoreItems.fill(2, 100, 120); |