summaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/archy/test/beep.js
blob: 4ea74f9cee439025eec49b8d3effefec4aa716d1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
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!'
          ]
        }
      ]
    });
    t.equal(s, [
        'beep',
        '├── ity',
        '└─┬ boop',
        '  ├─┬ o_O',
        '  │ ├─┬ oh',
        '  │ │ ├── hello',
        '  │ │ └── puny',
        '  │ └── human',
        '  └── party!',
        ''
    ].join('\n'));
    t.end();
});