source: trip-planner-front/node_modules/text-table/test/dotalign.js

Last change on this file was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago

initial commit

  • Property mode set to 100644
File size: 453 bytes
Line 
1var test = require('tape');
2var table = require('../');
3
4test('dot align', function (t) {
5 t.plan(1);
6 var s = table([
7 [ 'beep', '1024' ],
8 [ 'boop', '334.212' ],
9 [ 'foo', '1006' ],
10 [ 'bar', '45.6' ],
11 [ 'baz', '123.' ]
12 ], { align: [ 'l', '.' ] });
13 t.equal(s, [
14 'beep 1024',
15 'boop 334.212',
16 'foo 1006',
17 'bar 45.6',
18 'baz 123.'
19 ].join('\n'));
20});
Note: See TracBrowser for help on using the repository browser.