Skip to content

Commit

Permalink
Add test with array method values
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Jun 28, 2017
1 parent 0fa4309 commit 6d5d4b2
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -284,6 +284,28 @@ module.exports = {
'└────────────────────┴─────┘'
]

table.toString().should.eql(expected.join('\n'))
},
'test with array method values': function() {

var table = new Table({
head: ['pop', 'push', 'slice'],
style: {
head: [],
border: []
}
})

table.push(['push', 'slice', 'pop'])

var expected = [
'┌──────┬───────┬───────┐',
'│ pop │ push │ slice │',
'├──────┼───────┼───────┤',
'│ push │ slice │ pop │',
'└──────┴───────┴───────┘'
]

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

0 comments on commit 6d5d4b2

Please sign in to comment.