mirror of https://github.com/thumbsup/thumbsup
test(all): increase unit test coverage
parent
8bbe1186c5
commit
7208642d95
@ -0,0 +1,21 @@
|
||||
const should = require('should/as-function')
|
||||
const messages = require('../../bin/messages.js')
|
||||
|
||||
describe('messages', function () {
|
||||
['SUCCESS', 'GREETING', 'SORRY'].forEach(type => {
|
||||
it(`wraps ${type} messages in a box`, () => {
|
||||
const success = messages[type]({})
|
||||
should(success.indexOf('┌───')).above(-1)
|
||||
should(success.indexOf('───┐')).above(-1)
|
||||
should(success.indexOf('└───')).above(-1)
|
||||
should(success.indexOf('───┘')).above(-1)
|
||||
should(success.split('\n').length).above(4)
|
||||
})
|
||||
})
|
||||
|
||||
it('lists mandatory binary dependencies', () => {
|
||||
const required = messages.BINARIES_REQUIRED(['bin1', 'bin2'])
|
||||
should(required.indexOf('bin1\n')).above(-1)
|
||||
should(required.indexOf('bin2\n')).above(-1)
|
||||
})
|
||||
})
|
Loading…
Reference in New Issue