Last change
on this file since 1ad8e64 was 6a3a178, checked in by Ema <ema_spirova@…>, 3 years ago |
initial commit
|
-
Property mode
set to
100644
|
File size:
476 bytes
|
Line | |
---|
1 | var test = require('tape');
|
---|
2 | var table = require('../');
|
---|
3 |
|
---|
4 | test('dot align', function (t) {
|
---|
5 | t.plan(1);
|
---|
6 | var s = table([
|
---|
7 | [ '0.1.2' ],
|
---|
8 | [ '11.22.33' ],
|
---|
9 | [ '5.6.7' ],
|
---|
10 | [ '1.22222' ],
|
---|
11 | [ '12345.' ],
|
---|
12 | [ '5555.' ],
|
---|
13 | [ '123' ]
|
---|
14 | ], { align: [ '.' ] });
|
---|
15 | t.equal(s, [
|
---|
16 | ' 0.1.2',
|
---|
17 | '11.22.33',
|
---|
18 | ' 5.6.7',
|
---|
19 | ' 1.22222',
|
---|
20 | '12345.',
|
---|
21 | ' 5555.',
|
---|
22 | ' 123'
|
---|
23 | ].join('\n'));
|
---|
24 | });
|
---|
Note:
See
TracBrowser
for help on using the repository browser.