mirror of
https://github.com/backnotprop/plannotator.git
synced 2026-09-14 14:17:26 +08:00
9ed3ba8937
Adds direct markdown editing, source-backed annotate saves, folder edit buffers, and review-hardening fixes.
10 lines
509 B
TypeScript
10 lines
509 B
TypeScript
// Registers happy-dom globals for tests that mount React components (CM6 editor).
|
|
// Opt-in via DOM_TESTS=1 so the default `bun test` run keeps its native globals —
|
|
// happy-dom's window/fetch globals break server-oriented tests (cookie-proxy, ipc-server).
|
|
import { GlobalRegistrator } from '@happy-dom/global-registrator';
|
|
|
|
if (process.env.DOM_TESTS === '1' && typeof document === 'undefined') {
|
|
GlobalRegistrator.register();
|
|
(globalThis as Record<string, unknown>).IS_REACT_ACT_ENVIRONMENT = true;
|
|
}
|