mirror of
https://github.com/thumbsup/thumbsup
synced 2024-11-03 15:40:14 +00:00
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.
This commit is contained in:
parent
ace38cffeb
commit
ad46c8db87
@ -42,9 +42,9 @@ Thanks for using thumbsup!
|
|||||||
|
|
||||||
Don't forget to check out the docs at ${DOCS_URL}.
|
Don't forget to check out the docs at ${DOCS_URL}.
|
||||||
|
|
||||||
When building a gallery, thumbsup reports anonymous stats such as the OS and
|
When building a gallery, thumbsup reports anonymous stats such as the
|
||||||
gallery size. This is used to understand usage patterns & guide development
|
OS and gallery size. This is used to understand usage patterns & guide
|
||||||
effort. You can disable usage reporting by specifying --no-usage-stats.
|
development effort. You can disable this by specifying --no-usage-stats.
|
||||||
|
|
||||||
This welcome message will not be shown again for this gallery.
|
This welcome message will not be shown again for this gallery.
|
||||||
Enjoy!
|
Enjoy!
|
||||||
|
@ -2,15 +2,20 @@ const should = require('should/as-function')
|
|||||||
const messages = require('../../bin/messages.js')
|
const messages = require('../../bin/messages.js')
|
||||||
|
|
||||||
describe('messages', function () {
|
describe('messages', function () {
|
||||||
['SUCCESS', 'GREETING', 'SORRY'].forEach(type => {
|
it('shows SUCCESS in a box', () => {
|
||||||
it(`wraps ${type} messages in a box`, () => {
|
const stats = { albums: 1, photos: 1, videos: 1 }
|
||||||
const success = messages[type]({})
|
const success = messages.SUCCESS(stats)
|
||||||
should(success.indexOf('┌───')).above(-1)
|
assertInABox(success)
|
||||||
should(success.indexOf('───┐')).above(-1)
|
})
|
||||||
should(success.indexOf('└───')).above(-1)
|
|
||||||
should(success.indexOf('───┘')).above(-1)
|
it('shows GREETING in a box', () => {
|
||||||
should(success.split('\n').length).above(4)
|
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', () => {
|
it('lists mandatory binary dependencies', () => {
|
||||||
@ -24,3 +29,11 @@ describe('messages', function () {
|
|||||||
should(messages.PROBLEMS(2).indexOf('with 2 files.')).above(-1)
|
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…
Reference in New Issue
Block a user