Skip to content

Self-hosted, Self-Improving, Federated Everything App — dev management, agent orchestration, persistent mind, digital twin, second brain, and creative pipeline from a single dashboard over Tailscale to port the user into the OS

476 B
Raw Blame
import { vi } from 'vitest';

// Protocol tests supply messages themselves. Keep one inert window identity per
// iframe without enabling Happy DOM's remote page loading; restore spies at teardown.
export function mockFrameWindows() {
  const windows = new WeakMap();
  vi.spyOn(HTMLIFrameElement.prototype, 'contentWindow', 'get').mockImplementation(function () {
    if (!windows.has(this)) windows.set(this, { postMessage: vi.fn() });
    return windows.get(this);
  });
}