Skip to content

There can be more than Notion and Miro. AFFiNE(pronounced [ə‘fain]) is a next-gen knowledge base that brings planning, sorting and creating all together. Privacy first, open-source, customizable and ready to use.

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

if (typeof window !== 'undefined') {
  // Refs: https://github.com/jsdom/jsdom/blob/master/lib/jsdom/living/custom-elements/CustomElementRegistry-impl.js
  const customElements = {
    define: vi.fn(),
    get: vi.fn(),
    whenDefined: vi.fn(),
    upgrade: vi.fn(),
  };
  vi.stubGlobal('customElements', customElements);
}