UNPKG

@intocode-io/fireliff-cli

Version:

Command line interface for building LIFF app on Firebase

24 lines (19 loc) 555 B
import { validateConfig } from '../lib/shared'; describe('validateConfig', () => { const config = { line: {}, }; beforeAll(async () => { jest.spyOn(process, 'exit').mockImplementation(() => {}); jest.spyOn(console, 'log').mockImplementation(() => {}); await validateConfig(config); }); it('should exit with status 1', () => { expect(process.exit).toHaveBeenCalledTimes(1); expect(process.exit).toHaveBeenCalledWith(1); }); afterAll(() => { process.exit.mockRestore(); console.log.mockRestore(); }); });