refactor: replace ref() with shallowRef() in all test files

AGENTS.md requires shallowRef by default. All test state uses
reassignment (not mutation), so shallowRef is correct.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Yunfei He
2026-05-25 23:28:06 +08:00
parent 6e01954cf9
commit 5e54e5742d
12 changed files with 34 additions and 34 deletions
+2 -2
View File
@@ -1,4 +1,4 @@
import { nextTick, ref } from "vue";
import { nextTick, shallowRef } from "vue";
import { expect, test } from "vite-plus/test";
import { render } from "../src/index.ts";
import { Text } from "@vue-tui/runtime";
@@ -9,7 +9,7 @@ test("lastFrame captures rendered output", async () => {
});
test("frames accumulate on reactive updates", async () => {
const message = ref("first");
const message = shallowRef("first");
const { lastFrame, frames } = await render(() => <Text>{message.value}</Text>);
const initialCount = frames.length;
expect(lastFrame()).toContain("first");