Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
describe('showEndMessage', () => {
boxen.mockReturnValue(END_MSG)
it('should call boxen with correct parameters', () => {
showEndMessage()
expect(boxen).toHaveBeenCalledTimes(1)
expect(boxen).toHaveBeenCalledWith(END_MSG, BOXEN_CONFIG)
})
it('should call process.stdout.write with correct parameters', () => {
process.stdout.write = jest.fn()
showEndMessage()
expect(process.stdout.write).toHaveBeenCalledTimes(1)
expect(process.stdout.write).toHaveBeenCalledWith(END_MSG)
})