@nlabs/lex
Version:
26 lines (23 loc) • 686 B
JavaScript
// Mock implementation of ora
const mockSpinner = {
start: jest.fn().mockReturnThis(),
stop: jest.fn().mockReturnThis(),
succeed: jest.fn().mockReturnThis(),
fail: jest.fn().mockReturnThis(),
warn: jest.fn().mockReturnThis(),
info: jest.fn().mockReturnThis(),
text: '',
color: 'cyan',
isSpinning: false
};
const mockOra = jest.fn().mockImplementation(() => mockSpinner);
module.exports = () => ({
start: jest.fn().mockReturnThis(),
succeed: jest.fn().mockReturnThis(),
fail: jest.fn().mockReturnThis(),
stop: jest.fn().mockReturnThis(),
info: jest.fn().mockReturnThis(),
warn: jest.fn().mockReturnThis(),
text: ''
});
module.exports.default = mockOra;