Files
vue-tui/packages/runtime-tests/integration/lifecycle/multi-app.test.tsx
T
Yunfei He a7f7d9957d feat(runtime-tests): integration test suite
21 test files covering components, composables, focus, lifecycle,
and scheduler through the public render() API.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 18:13:53 +08:00

20 lines
540 B
TypeScript

import { defineComponent } from "vue";
import { expect, test } from "vite-plus/test";
import { render } from "@vue-tui/testing";
import { Text } from "@vue-tui/runtime";
test("two concurrent render() calls coexist independently", async () => {
const App = defineComponent(() => () => <Text>hello</Text>);
const a = await render(App);
const b = await render(App);
expect(a.lastFrame()).toContain("hello");
expect(b.lastFrame()).toContain("hello");
a.unmount();
expect(b.lastFrame()).toContain("hello");
b.unmount();
});