chore: remove legacy SSR checks and consolidate migration maintenance

This commit is contained in:
maoyingjie
2026-10-26 10:32:22 +08:00
parent 52a0bef851
commit 60af6ee40b
169 changed files with 958 additions and 8422 deletions
+1 -22
View File
@@ -1,7 +1,6 @@
import { afterEach, describe, expect, it, vi } from "vitest";
import { mount } from "@vue/test-utils";
import { createSSRApp, defineComponent, h, nextTick, ref } from "vue";
import { renderToString } from "@vue/server-renderer";
import { defineComponent, h, nextTick, ref } from "vue";
import {
InputOTP,
InputOTPGroup,
@@ -541,23 +540,3 @@ describe("InputOTP types", () => {
expect((bad as { variant?: string }).variant).toBe("ghost");
});
});
describe("InputOTP SSR", () => {
it("renders without touching browser globals", async () => {
const html = await renderToString(
createSSRApp({
render: () =>
h(InputOTP, { maxLength: 4, name: "code", defaultValue: "12" }, () =>
h(InputOTPGroup, () =>
[0, 1, 2, 3].map((i) => h(InputOTPSlot, { index: i })),
),
),
}),
);
expect(html).toContain('data-slot="input-otp"');
expect(html).toContain("hv-input-otp");
expect(html).toContain('data-slot="input-otp-slot"');
expect(html).toContain("1");
expect(html).toContain('name="code"');
});
});