chore: remove legacy SSR checks and consolidate migration maintenance
This commit is contained in:
+1
-22
@@ -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"');
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user