Skip to content

Commit

Permalink
test vertical tables
Browse files Browse the repository at this point in the history
  • Loading branch information
sonnym committed Jul 12, 2012
1 parent 55086c2 commit 7972cc0
Showing 1 changed file with 19 additions and 1 deletion.
20 changes: 19 additions & 1 deletion test/index.test.js
Expand Up @@ -47,6 +47,24 @@ module.exports = {
});

table.width.should.eql(8);
}
},

'test vertical table output': function() {
var table = new Table({ style: {} }); // clear styles to prevent color output

table.push(
{'v0.1': 'Testing something cool'}
, {'v0.1': 'Testing something cool'}
);

var expected = [
'┏━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━┓'
, '┃v0.1 ┃Testing something cool┃'
, '┣━━━━━━━━━╋━━━━━━━━━━━━━━━━━━━━━━┫'
, '┃v0.1 ┃Testing something cool┃'
, '┗━━━━━━━━━┻━━━━━━━━━━━━━━━━━━━━━━┛'
];

table.toString().should.eql(expected.join("\n"));
}
};

0 comments on commit 7972cc0

Please sign in to comment.