UNPKG

create-new-app

Version:

Easily generate a new React application, optionally with Express & MongoDB.

17 lines (12 loc) 452 B
const showMongoHelp = require('../../modules/showMongoHelp') describe('showMongoHelp', () => { const originalConsoleLog = console.log console.log = jest.fn() beforeEach(() => console.log.mockReset()) afterAll(() => console.log = originalConsoleLog) it('should log mongo-specific help to the screen', () => { showMongoHelp() expect(console.log).toHaveBeenCalledTimes(1) expect(console.log.mock.calls).toMatchSnapshot() }) })