chore: remove legacy SSR checks and consolidate migration maintenance
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { afterEach, describe, expect, it } from "vitest";
|
||||
import { mount, flushPromises } from "@vue/test-utils";
|
||||
import { createSSRApp, defineComponent, ref } from "vue";
|
||||
import { renderToString } from "@vue/server-renderer";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import {
|
||||
CalendarDate,
|
||||
CalendarDateTime,
|
||||
@@ -231,28 +230,6 @@ describe("DateField", () => {
|
||||
expect(part(w, "second").text()).toBe("05");
|
||||
expect(values(w)).toEqual(["2024-02-03T13:04:05"]);
|
||||
});
|
||||
it("hydrates explicit date content with unique IDs and stable nodes", async () => {
|
||||
const component = defineComponent({
|
||||
components,
|
||||
setup: () => ({ initial }),
|
||||
template: `<DateField :default-value="initial">${content}</DateField>`,
|
||||
});
|
||||
const host = document.createElement("div");
|
||||
host.innerHTML = await renderToString(createSSRApp(component));
|
||||
document.body.append(host);
|
||||
const before = host.querySelector('[data-type="day"]');
|
||||
const warnings: string[] = [];
|
||||
const app = createSSRApp(component);
|
||||
app.config.warnHandler = (message) => warnings.push(message);
|
||||
app.mount(host);
|
||||
await flushPromises();
|
||||
try {
|
||||
expect(warnings).toEqual([]);
|
||||
expect(host.querySelector('[data-type="day"]')).toBe(before);
|
||||
} finally {
|
||||
app.unmount();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
it("applies min/max and unavailable constraints to the shared native validator", async () => {
|
||||
|
||||
Reference in New Issue
Block a user