source: imaps-frontend/node_modules/object-inspect/test/deep.js@ d565449

main
Last change on this file since d565449 was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 400 bytes
Line 
1var inspect = require('../');
2var test = require('tape');
3
4test('deep', function (t) {
5 t.plan(4);
6 var obj = [[[[[[500]]]]]];
7 t.equal(inspect(obj), '[ [ [ [ [ [Array] ] ] ] ] ]');
8 t.equal(inspect(obj, { depth: 4 }), '[ [ [ [ [Array] ] ] ] ]');
9 t.equal(inspect(obj, { depth: 2 }), '[ [ [Array] ] ]');
10
11 t.equal(inspect([[[{ a: 1 }]]], { depth: 3 }), '[ [ [ [Object] ] ] ]');
12});
Note: See TracBrowser for help on using the repository browser.