aboutsummaryrefslogtreecommitdiff
path: root/deps/node/deps/npm/node_modules/archy/test/non_unicode.js
blob: 7204d33271d518c4b1685550f44a6a7316cd8eed (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!'
          ]
        }
      ]
    }, '', { unicode : false });
    t.equal(s, [
        'beep',
        '+-- ity',
        '`-- boop',
        '  +-- o_O',
        '  | +-- oh',
        '  | | +-- hello',
        '  | | `-- puny',
        '  | `-- human',
        '  `-- party!',
        ''
    ].join('\n'));
    t.end();
});