Files
vue-tui/packages/runtime-tests/integration/pty/console.test.ts
T
Yunfei He 3995e84285 test: add PTY console and useStdout fixture scripts + tests
Port console.log and useStdout.write fixtures from Ink to verify
patchConsole and useStdout().write() work correctly in a real terminal.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 22:45:17 +08:00

15 lines
493 B
TypeScript

import { test, expect } from "vite-plus/test";
import { run } from "./helpers/run.ts";
test.sequential("console.log doesn't corrupt output", async () => {
const output = await run("console");
expect(output).toContain("First log");
expect(output).toContain("Second log");
});
test.sequential("useStdout.write in real terminal", async () => {
const output = await run("use-stdout");
expect(output).toContain("Hello from vue-tui to stdout");
expect(output).toContain("exited");
});