chore: remove legacy SSR checks and consolidate migration maintenance
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import { afterEach, 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 Area from "../packages/vue/tests/fixtures/ColorAreaFoundation.vue";
|
||||
import Picker from "../packages/vue/tests/fixtures/ColorPickerFoundation.vue";
|
||||
import {
|
||||
@@ -542,24 +541,4 @@ describe("private color area pointer ownership", () => {
|
||||
expect(color.toString("hsba")).toBe("hsba(240, 50%, 50%, 0.5)");
|
||||
expect(color.formatChannelValue("alpha", "en-US")).toBe("50%");
|
||||
});
|
||||
it("hydrates actual multiple picker nodes without replacing them or sharing IDs", async () => {
|
||||
const App = defineComponent({
|
||||
components: { Picker },
|
||||
template: "<main><Picker/><Picker/></main>",
|
||||
});
|
||||
const html = await renderToString(createSSRApp(App));
|
||||
const container = document.createElement("div");
|
||||
container.innerHTML = html;
|
||||
document.body.append(container);
|
||||
const before = container.querySelector("[data-color-area]");
|
||||
const warn = vi.spyOn(console, "warn").mockImplementation(() => {});
|
||||
const app = createSSRApp(App);
|
||||
app.mount(container);
|
||||
await flushPromises();
|
||||
expect(container.querySelector("[data-color-area]")).toBe(before);
|
||||
const ids = [...container.querySelectorAll("[id]")].map((e) => e.id);
|
||||
expect(new Set(ids).size).toBe(ids.length);
|
||||
expect(warn).not.toHaveBeenCalled();
|
||||
app.unmount();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user