]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/text-table/test/dotalign.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / text-table / test / dotalign.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/text-table/test/dotalign.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/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'));
+});