Skip to content
Permalink
8d14cd4781
Go to file
 
 
Cannot retrieve contributors at this time
31 lines (26 sloc) 691 Bytes
import { consola } from '../utils'
import { showBanner } from '../../src/utils/banner'
jest.mock('std-env', () => ({
test: false,
minimalCLI: true
}))
describe('cli/utils', () => {
afterEach(() => jest.resetAllMocks())
test('showBanner prints only listeners', () => {
const listeners = [
{ url: 'first' },
{ url: 'second' }
]
showBanner({
options: {
cli: {}
},
server: {
listeners
}
})
expect(consola.info).toHaveBeenCalledTimes(2)
expect(consola.info).toHaveBeenCalledWith(`Listening on: ${listeners[0].url}`)
expect(consola.info).toHaveBeenCalledWith(`Listening on: ${listeners[1].url}`)
})
})
You can’t perform that action at this time.