MCPcopy Create free account
hub / github.com/UsefulSoftwareCo/executor / FakeElement

Class FakeElement

packages/app/src/server-disconnected.test.ts:27–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

25});
26
27class FakeElement {
28 id = "";
29 textContent = "";
30 readonly style = { cssText: "" };
31 readonly children: FakeElement[] = [];
32
33 append(...nodes: FakeElement[]): void {
34 this.children.push(...nodes);
35 }
36
37 byId(id: string): FakeElement | null {
38 if (this.id === id) return this;
39 for (const child of this.children) {
40 const found = child.byId(id);
41 if (found) return found;
42 }
43 return null;
44 }
45
46 get text(): string {
47 return [this.textContent, ...this.children.map((child) => child.text)].join(" ").trim();
48 }
49}
50
51interface FetchCall {
52 readonly input: unknown;

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected