b19a7e7ace40af5c5b4c8ff3508c7fdc642e3c2c.svn-base 799 Bytes
var test = require('tape');
var archy = require('../');

test('beep', function (t) {
    var s = archy({
      label : 'beep',
      nodes : [
        'ity',
        {
          label : 'boop',
          nodes : [
            {
              label : 'o_O',
              nodes : [
                {
                  label : 'oh',
                  nodes : [ 'hello', 'puny' ]
                },
                'human'
              ]
            },
            'party!'
          ]
        }
      ]
    }, '', { unicode : false });
    t.equal(s, [
        'beep',
        '+-- ity',
        '`-- boop',
        '  +-- o_O',
        '  | +-- oh',
        '  | | +-- hello',
        '  | | `-- puny',
        '  | `-- human',
        '  `-- party!',
        ''
    ].join('\n'));
    t.end();
});