mirror of
https://github.com/openclaw/openclaw.git
synced 2026-07-09 15:59:30 +00:00
test(ui): isolate chat pane custom-element registration (#102869)
* test(ui): isolate chat pane registration * test(ui): document shared registry invariant * test(ui): isolate chat page environment
This commit is contained in:
parent
54f45a950b
commit
4bf348bec8
1 changed files with 4 additions and 6 deletions
|
|
@ -1,13 +1,11 @@
|
|||
/* @vitest-environment jsdom */
|
||||
/* @vitest-environment-options {"url":"http://chat-page.test/"} */
|
||||
|
||||
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
|
||||
|
||||
vi.mock("./chat-pane.ts", () => {
|
||||
if (!customElements.get("openclaw-chat-pane")) {
|
||||
customElements.define("openclaw-chat-pane", class extends HTMLElement {});
|
||||
}
|
||||
return {};
|
||||
});
|
||||
// The dedicated jsdom context keeps this host-only mock from sharing the
|
||||
// production tag registry with component tests.
|
||||
vi.mock("./chat-pane.ts", () => ({}));
|
||||
|
||||
import { loadSettings } from "../../app/settings.ts";
|
||||
import type { ResizableDivider } from "../../components/resizable-divider.ts";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue