Sha256: e904cddc6f53b4d0ca9171ceb31fe4039b8fedea78575863158b86a2eba74d5c

Contents?: true

Size: 451 Bytes

Versions: 45

Compression:

Stored size: 451 Bytes

Contents

var inspect = require('../');
var test = require('tape');

test('circular', function (t) {
    t.plan(2);
    var obj = { a: 1, b: [3, 4] };
    obj.c = obj;
    t.equal(inspect(obj), '{ a: 1, b: [ 3, 4 ], c: [Circular] }');

    var double = {};
    double.a = [double];
    double.b = {};
    double.b.inner = double.b;
    double.b.obj = double;
    t.equal(inspect(double), '{ a: [ [Circular] ], b: { inner: [Circular], obj: [Circular] } }');
});

Version data entries

45 entries across 44 versions & 4 rubygems

Version Path
immosquare-cleaner-0.1.51 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.50 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.49 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.48 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.47 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.46 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.45 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.44 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.43 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.42 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.41 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.40 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.39 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.38 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.32 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.31 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.30 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.29 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.28 node_modules/object-inspect/test/circular.js
immosquare-cleaner-0.1.27 node_modules/object-inspect/test/circular.js