Skip to content
Browse files

Add a test for the the compact mode

  • Loading branch information...
1 parent 912ec44 commit 5416add3a729b4fc3ca480e3351e20e6bc80a0e2 @em- committed Mar 17, 2013
Showing with 24 additions and 0 deletions.
  1. +24 −0 test/index.test.js
View
24 test/index.test.js
@@ -158,4 +158,28 @@ module.exports = {
table.toString().should.eql(expected.join("\n"));
},
+ 'test compact shortand': function (){
+ var table = new Table({
+ style: {
+ head: []
+ , border: []
+ , compact : true
+ }
+ });
+
+ table.push(
+ ['foo', 'bar', 'baz']
+ , ['frob', 'bar', 'quuz']
+ );
+
+ var expected = [
+ '┌──────┬─────┬──────┐'
+ , '│ foo │ bar │ baz │'
+ , '│ frob │ bar │ quuz │'
+ , '└──────┴─────┴──────┘'
+ ];
+
+ table.toString().should.eql(expected.join("\n"));
+ },
+
};

0 comments on commit 5416add

Please sign in to comment.
Something went wrong with that request. Please try again.