chores(deps): fix build after Boxen upgrade

Boxen has a new line-wrapping behavior that doesn't use
line breaks when the content is over 80 characters.

It's simpler to reformat the message.
pull/224/head
Romain 3 years ago
parent ace38cffeb
commit ad46c8db87

@ -42,9 +42,9 @@ Thanks for using thumbsup!
Don't forget to check out the docs at ${DOCS_URL}.
When building a gallery, thumbsup reports anonymous stats such as the OS and
gallery size. This is used to understand usage patterns & guide development
effort. You can disable usage reporting by specifying --no-usage-stats.
When building a gallery, thumbsup reports anonymous stats such as the
OS and gallery size. This is used to understand usage patterns & guide
development effort. You can disable this by specifying --no-usage-stats.
This welcome message will not be shown again for this gallery.
Enjoy!

@ -2,15 +2,20 @@ 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('shows SUCCESS in a box', () => {
const stats = { albums: 1, photos: 1, videos: 1 }
const success = messages.SUCCESS(stats)
assertInABox(success)
})
it('shows GREETING in a box', () => {
const greeting = messages.GREETING()
assertInABox(greeting)
})
it('shows SORRY in a box', () => {
const sorry = messages.SORRY('thumbsup.log')
assertInABox(sorry)
})
it('lists mandatory binary dependencies', () => {
@ -24,3 +29,11 @@ describe('messages', function () {
should(messages.PROBLEMS(2).indexOf('with 2 files.')).above(-1)
})
})
function assertInABox (result) {
should(result.indexOf('┌───')).above(-1)
should(result.indexOf('───┐')).above(-1)
should(result.indexOf('└───')).above(-1)
should(result.indexOf('───┘')).above(-1)
should(result.split('\n').length).above(4)
}

Loading…
Cancel
Save