Files
vue-tui/packages/runtime-tests/integration/pty/fixtures/use-animation-non-interactive-exit.tsx
T
Yunfei He 54b5394e88 test: add issue-450 rerender + animation exit PTY fixtures + 7 tests
- issue-450-fixture-helpers.tsx with rerender/initial helpers
- 5 issue-450 fixture files (fullscreen, overflow, grow, shrink)
- 2 useAnimation exit fixtures (interactive false, non-interactive)
- 7 tests with exact clearTerminal/eraseLine count assertions

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

22 lines
469 B
TypeScript

import { Text, createApp, useAnimation, useExit } from "@vue-tui/runtime";
import { defineComponent, watch } from "vue";
const Spinner = defineComponent(() => {
const { frame } = useAnimation({ interval: 8 });
const exit = useExit();
watch(frame, (value) => {
if (value >= 3) {
exit();
}
});
return () => <Text>{String(frame.value)}</Text>;
});
const app = createApp(Spinner);
app.mount();
await app.waitUntilExit();
console.log("exited");