test(cli): mock console and stdout write

This commit is contained in:
Johann Schopplich
2025-11-24 16:21:01 +01:00
parent 8f96b8f0c8
commit 14a8cb132e

View File

@@ -8,6 +8,8 @@ import { createCliTestContext, mockStdin, runCli } from './utils'
describe('toon CLI', () => {
beforeEach(() => {
vi.spyOn(process, 'exit').mockImplementation(() => 0 as never)
vi.spyOn(console, 'log').mockImplementation(() => undefined)
vi.spyOn(process.stdout, 'write').mockImplementation(() => true)
})
afterEach(() => {