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 -23
View File
@@ -1,7 +1,6 @@
import { afterEach, beforeEach, describe, it, expect, vi } from "vitest";
import { mount, flushPromises } from "@vue/test-utils";
import { defineComponent, shallowRef, createSSRApp } from "vue";
import { renderToString } from "@vue/server-renderer";
import { defineComponent, shallowRef } from "vue";
import Picker from "../packages/vue/tests/fixtures/ColorPickerComposition.vue";
import { parseColor, Color } from "../packages/vue/src/components/color/value";
import { serializeColorValue } from "../packages/vue/src/components/color/submission";
@@ -231,25 +230,4 @@ describe("private color owner and Popover composition", () => {
expect(values(w)).toEqual([]);
expect(w.get("button").element.disabled).toBe(true);
});
it("hydrates closed owners with one stable submission and no popup duplication", async () => {
const App = defineComponent({
components: { Picker },
template: '<main><Picker name="first"/><Picker name="second"/></main>',
});
const container = document.createElement("div");
container.innerHTML = await renderToString(createSSRApp(App));
document.body.append(container);
const nodes = [...container.querySelectorAll("input")];
const warn = vi.spyOn(console, "warn").mockImplementation(() => {}),
error = vi.spyOn(console, "error").mockImplementation(() => {});
const app = createSSRApp(App);
app.mount(container);
await flushPromises();
expect([...container.querySelectorAll("input")]).toEqual(nodes);
const ids = [...container.querySelectorAll("[id]")].map((n) => n.id);
expect(new Set(ids).size).toBe(ids.length);
expect(warn).not.toHaveBeenCalled();
expect(error).not.toHaveBeenCalled();
app.unmount();
});
});