1var test = require('tape'); 2var archy = require('../'); 3 4test('multi-line', function (t) { 5 var s = archy({ 6 label : 'beep\none\ntwo', 7 nodes : [ 8 'ity', 9 { 10 label : 'boop', 11 nodes : [ 12 { 13 label : 'o_O\nwheee', 14 nodes : [ 15 { 16 label : 'oh', 17 nodes : [ 'hello', 'puny\nmeat' ] 18 }, 19 'creature' 20 ] 21 }, 22 'party\ntime!' 23 ] 24 } 25 ] 26 }); 27 t.equal(s, [ 28 'beep', 29 '│ one', 30 '│ two', 31 '├── ity', 32 '└─┬ boop', 33 ' ├─┬ o_O', 34 ' │ │ wheee', 35 ' │ ├─┬ oh', 36 ' │ │ ├── hello', 37 ' │ │ └── puny', 38 ' │ │ meat', 39 ' │ └── creature', 40 ' └── party', 41 ' time!', 42 '' 43 ].join('\n')); 44 t.end(); 45}); 46