chore: remove legacy SSR checks and consolidate migration maintenance
This commit is contained in:
+1
-35
@@ -1,7 +1,6 @@
|
||||
import { afterEach, describe, expect, it, vi } from "vitest";
|
||||
import { mount, flushPromises } from "@vue/test-utils";
|
||||
import { createSSRApp, defineComponent, h, ref } from "vue";
|
||||
import { renderToString } from "@vue/server-renderer";
|
||||
import { defineComponent, ref } from "vue";
|
||||
import {
|
||||
Slider,
|
||||
SliderTrack,
|
||||
@@ -241,39 +240,6 @@ describe("Slider public contracts", () => {
|
||||
expect(sliders(wrapper)[0].attributes("aria-describedby")).toBeUndefined();
|
||||
expect(wrapper.find(".custom-thumb").exists()).toBe(false);
|
||||
});
|
||||
it("hydrates explicit range positions and names without warnings", async () => {
|
||||
const app = {
|
||||
render: () =>
|
||||
h(Slider, { defaultValue: [20, 80] }, () => [
|
||||
h(Label, {}, () => "Price"),
|
||||
h(SliderTrack, {}, () => [
|
||||
h(SliderFill),
|
||||
h(SliderThumb),
|
||||
h(SliderThumb, { index: 1 }),
|
||||
]),
|
||||
]),
|
||||
};
|
||||
const html = await renderToString(createSSRApp(app));
|
||||
const container = document.createElement("div");
|
||||
container.innerHTML = html;
|
||||
document.body.append(container);
|
||||
const warn = vi.spyOn(console, "warn").mockImplementation(() => {});
|
||||
const error = vi.spyOn(console, "error").mockImplementation(() => {});
|
||||
const client = createSSRApp(app);
|
||||
try {
|
||||
client.mount(container);
|
||||
await flushPromises();
|
||||
expect(warn).not.toHaveBeenCalled();
|
||||
expect(error).not.toHaveBeenCalled();
|
||||
expect(
|
||||
[...container.querySelectorAll("input")].map((input) => input.value),
|
||||
).toEqual(["20", "80"]);
|
||||
} finally {
|
||||
client.unmount();
|
||||
warn.mockRestore();
|
||||
error.mockRestore();
|
||||
}
|
||||
});
|
||||
it("compiles and mounts all nine baseline demos without Vue warnings", async () => {
|
||||
const warn = vi.spyOn(console, "warn").mockImplementation(() => {});
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user