mirror of
https://github.com/n8n-io/n8n.git
synced 2026-06-03 02:07:06 +02:00
29 lines
535 B
TypeScript
29 lines
535 B
TypeScript
import './matchers';
|
|
|
|
vi.mock('node:child_process');
|
|
vi.mock('@clack/prompts', () => ({
|
|
intro: vi.fn(),
|
|
outro: vi.fn(),
|
|
cancel: vi.fn(),
|
|
note: vi.fn(),
|
|
log: {
|
|
success: vi.fn(),
|
|
warning: vi.fn(),
|
|
error: vi.fn(),
|
|
info: vi.fn(),
|
|
},
|
|
spinner: vi.fn(() => ({
|
|
start: vi.fn(),
|
|
stop: vi.fn(),
|
|
message: vi.fn(),
|
|
})),
|
|
confirm: vi.fn(),
|
|
text: vi.fn(),
|
|
select: vi.fn(),
|
|
isCancel: vi.fn(),
|
|
}));
|
|
|
|
vi.spyOn(process, 'exit').mockImplementation((code?: string | number | null) => {
|
|
throw new Error(`EEXIT: ${code ?? 0}`);
|
|
});
|