Sha256: 308253ba458109b4c44356e7283b8e33bdfce3ecc6d47168a45c41c6359c6831

Contents?: true

Size: 929 Bytes

Versions: 3

Compression:

Stored size: 929 Bytes

Contents

var assert = require('assert');
var traverse = require('../');
var deepEqual = require('./lib/deep_equal');

exports.super_deep = function () {
    var util = require('util');
    var a0 = make();
    var a1 = make();
    assert.ok(deepEqual(a0, a1));
    
    a0.c.d.moo = true;
    assert.ok(!deepEqual(a0, a1));
    
    a1.c.d.moo = true;
    assert.ok(deepEqual(a0, a1));
    
    // TODO: this one
    //a0.c.a = a1;
    //assert.ok(!deepEqual(a0, a1));
};

function make () {
    var a = { self : 'a' };
    var b = { self : 'b' };
    var c = { self : 'c' };
    var d = { self : 'd' };
    var e = { self : 'e' };
    
    a.a = a;
    a.b = b;
    a.c = c;
    
    b.a = a;
    b.b = b;
    b.c = c;
    
    c.a = a;
    c.b = b;
    c.c = c;
    c.d = d;
    
    d.a = a;
    d.b = b;
    d.c = c;
    d.d = d;
    d.e = e;
    
    e.a = a;
    e.b = b;
    e.c = c;
    e.d = d;
    e.e = e;
    
    return a;
}

Version data entries

3 entries across 3 versions & 2 rubygems

Version Path
trans-0.5.10 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/super_deep.js
trans-0.5.9 template/node_modules/grunt-contrib-nodeunit/node_modules/nodeunit/node_modules/tap/node_modules/runforcover/node_modules/bunker/node_modules/burrito/node_modules/traverse/test/super_deep.js
holmes-0.0.1 lib/holmes/node_modules/detective/node_modules/burrito/node_modules/traverse/test/super_deep.js