.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / text-table / test / dotalign.js
diff --git a/.config/coc/extensions/node_modules/coc-prettier/node_modules/text-table/test/dotalign.js b/.config/coc/extensions/node_modules/coc-prettier/node_modules/text-table/test/dotalign.js
new file mode 100644 (file)
index 0000000..f804f92
--- /dev/null
@@ -0,0 +1,20 @@
+var test = require('tape');
+var table = require('../');
+
+test('dot align', function (t) {
+    t.plan(1);
+    var s = table([
+        [ 'beep', '1024' ],
+        [ 'boop', '334.212' ],
+        [ 'foo', '1006' ],
+        [ 'bar', '45.6' ],
+        [ 'baz', '123.' ]
+    ], { align: [ 'l', '.' ] });
+    t.equal(s, [
+        'beep  1024',
+        'boop   334.212',
+        'foo   1006',
+        'bar     45.6',
+        'baz    123.'
+    ].join('\n'));
+});