completed exercise 3.1

This commit is contained in:
counterweight 2025-05-31 22:51:30 +02:00
parent 68aa0e9905
commit 0bd43956c9
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
604 changed files with 67855 additions and 0 deletions

View file

@ -0,0 +1,12 @@
var inspect = require('../');
var test = require('tape');
test('deep', function (t) {
t.plan(4);
var obj = [[[[[[500]]]]]];
t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
});