deep.js 400 B

123456789101112
  1. var inspect = require('../');
  2. var test = require('tape');
  3. test('deep', function (t) {
  4. t.plan(4);
  5. var obj = [[[[[[500]]]]]];
  6. t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
  7. t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
  8. t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
  9. t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
  10. });