export { A as AccessorKeysOf, a as AddAccessorsSpies, b as AddCalledWithAny, c as AddCalledWithObservable, d as AddCalledWithPromise, e as AddCalledWithSpyMethods, f as AddObservableSpyMethods, g as AddPromiseSpyMethods, h as AddSpyMethodsByReturnTypes, i as AddThrowHelper, j as AddVoidReturnHelpers, k as AnyReturnHelpers, l as AutoSpyRxjsTypes, m as ClassSpyConfiguration, C as ClassType, n as CompleteValueConfig, D as DeepMockProxy, o as DeepPartial, E as ErrorValueConfig, F as Func, I as InstanceSpyConfiguration, M as MethodReturns, p as Mutable, N as NextValueConfig, O as ObservableLike, q as OnlyMethodKeysOf, r as OnlyObservablePropsOf, s as OnlyPropsOf, t as Overload, u as OverloadChoice, v as Overloads, P as PropStubValue, S as Spy, w as SpyDisposable, x as SpyOptions, y as StrictSpyConfiguration, z as SubjectLike, B as SubjectOf, U as UnstubbedCall, G as UnstubbedCallHandler, H as UnstubbedRead, J as UnstubbedReadHandler, V as ValueConfig, K as ValueConfigPerCall, W as WithMockReturnValue } from './types-BM3BcWj1.js'; export { AdoptMockOptions, AdoptedMock, ArgCaptor, AsInstances, AssertMockedOptions, CallLog, CaptureArgOptions, ConstructorMock, ConstructorSpy, FixtureFactory, FlushUntilOptions, MockDeepOptions, ModuleNamespace, ModuleNamespaceOptions, SpyClassOptions, adoptMock, asInstance, asInstances, asSpy, assertMocked, captureArg, clearAutoSpy, createFixture, createFixtureFactory, createLog, createMock, createSpyClass, createSpyFromClass, createSpyFromInstance, errorHandler, flushEventLoop, flushEventLoopUntil, mockConstructor, mockDeep, moduleNamespace, narrow, resetAutoSpy, restoreSpiedInstance, settleDynamicImport, stubConstructor, withOverrides } from './bun.js'; export { A as AutoMockConfiguration, a as AutoSpyDefaultEntry, C as CallbackSubscribable, E as EmissionObserver, b as EmissionOptions, c as EmissionSource, S as SubscribableLike, d as autoMocked, e as clearAutoSpyDefaults, f as createAutoMock, g as expectCompletion, h as expectEmission, i as expectEmissions, j as expectError, k as expectNoEmission, r as registerAutoSpyDefaults, s as setEmissionTimeout } from './expect-emission-S5asJaJP.js'; export { c as createFunctionSpy, d as describeDuplicateCopies, g as getPackageCopies } from './package-identity-Cn7yncmJ.js'; export { A as AccessorImplementations, O as OutsideHookReaction, R as RestoreProp, c as countMockedProps, m as mockAccessorsProp, a as mockReadonlyProp, b as mockReadonlyPropGetter, d as mockValueProp, r as reportPropsOutsideHooks, e as restoreMockedProps } from './prop-mock-C--a8rpU.js'; export { A as AngularValueProvider, a as AutoSpiedInstance, C as ComponentInputs, b as CreateWithAutoSpiesOptions, R as RenderShallowOptions, c as ResourceStatusLike, d as RunCounter, S as SettleResourceOptions, e as ShallowRender, f as SpyRegistry, g as StableOptions, h as createWithAutoSpies, i as flushEffects, j as injectSpy, p as provideAutoSpy, r as renderShallow, k as runEffect, s as setInputs, l as settleResource, m as stable, t as trackEffectRuns, n as trackRecomputations } from './track-signal-runs-BSVObkds.js'; import 'vitest'; import '@angular/core'; import '@angular/core/testing'; /** How {@link inlineAngularResources} reads resources and which stylesheets it keeps. */ interface AngularResourceInlinerOptions { /** Read a resource file. Defaults to a UTF-8 `readFileSync`; injected in tests. */ readResource?: (path: string) => string; /** * Extensions whose contents are inlined verbatim. Anything else — `.scss`, `.less`, `.styl` — * becomes an empty stylesheet: a test runner has no CSS pre-processor, and no spec asserts on * styles (a component still compiles and renders without them). */ inlineStyleExtensions?: readonly string[]; } /** * Rewrite `templateUrl` / `styleUrl` / `styleUrls` in `source` into inline `template` / `styles`. * * Returns `undefined` when the file declares neither, so a caller can hand the original source back * untouched instead of paying for a copy. * * @param source Contents of the module being loaded. * @param modulePath Absolute path of that module — resource URLs resolve relative to its directory. * * @example * ```ts * const source = inlineAngularResources(rawSource, modulePath, { inlineStyleExtensions: ['.css', '.scss'] }); * ``` */ declare function inlineAngularResources(source: string, modulePath: string, options?: AngularResourceInlinerOptions): string | undefined; /** A named strategy that installs browser globals, or throws if its implementation is missing. */ interface DomRegistrar { readonly name: string; readonly install: () => Promise | void; } /** How {@link registerDomGlobals} decides whether — and with what — to install a DOM. */ interface RegisterDomGlobalsOptions { /** Tried in order; the first one that installs without throwing wins. */ registrars?: readonly DomRegistrar[]; /** Detects an existing DOM. Defaults to "`globalThis.document` is defined". */ hasDom?: () => boolean; } /** * Install a DOM into the current runtime, unless one is already there. * * @returns the name of the registrar that installed it, or `undefined` when a DOM already existed. * @throws when every registrar failed — the message names each one and why, because the fix is * always "install the package you meant to use". * * @example * ```ts * // in a bun test preload * const installed = await registerDomGlobals(); * * // installed === 'happy-dom' | 'jsdom' | undefined (a DOM was already present) * ``` */ declare function registerDomGlobals(options?: RegisterDomGlobalsOptions): Promise; /** * Copy a window object's properties onto a global-like target. * * {@link FORCED_GLOBALS} always overwrite; everything else is only filled in where the target has * no value yet, so a runtime built-in (`fetch`, `URL`, `AbortController`) keeps its native * implementation. A property the target refuses to accept is skipped rather than fatal — a locked * global is not worth failing a whole test run over. * * Skipped, but **not** in silence when it is one of {@link FORCED_GLOBALS}: those are the five the * DOM is useless without, so a refused `document` means the environment came up half-installed and * the first spec that touches it reports `document is not defined` — naming neither this helper nor * the property that refused. The rest stay quiet, because a host built-in keeping its own * implementation is the documented outcome rather than a problem. * * @example * ```ts * copyWindowGlobals(dom.window as unknown as Record, globalThis as Record); * ``` */ declare function copyWindowGlobals(source: Record, target: Record): void; /** The `jsdom` shape {@link createJsdomRegistrar} needs — narrower than the package's own types. */ interface JsdomModule { JSDOM: new (html: string, options?: Record) => { window: Record; }; } /** How {@link createJsdomRegistrar} builds and installs its window. */ interface JsdomRegistrarOptions { /** Loads `jsdom`. Kept injectable so this module never depends on the optional peer. */ load: () => Promise; /** Where the globals land — `globalThis` in a preload, a throwaway object in a test. */ target: Record; /** Document URL — Angular's router and `location`-reading code want a real origin. */ url?: string; } /** * A {@link DomRegistrar} backed by `jsdom`, the implementation Vitest's `environment: 'jsdom'` uses. * * @example * ```ts * await registerDomGlobals({ * registrars: [createJsdomRegistrar({ load: () => import('jsdom'), target: globalThis, url: 'https://app.test/' })], * }); * ``` */ declare function createJsdomRegistrar(options: JsdomRegistrarOptions): DomRegistrar; /** The `@happy-dom/global-registrator` shape — a module that patches `globalThis` itself. */ interface GlobalRegistratorModule { GlobalRegistrator: { register: () => Promise | void; }; } /** How {@link createGlobalRegistratorRegistrar} loads its registrator. */ interface GlobalRegistratorOptions { name: string; load: () => Promise; } /** * A {@link DomRegistrar} backed by a self-registering module — the shape * `@happy-dom/global-registrator` exposes, and Bun's own documented way to get a DOM. * * @example * ```ts * await registerDomGlobals({ * registrars: [createGlobalRegistratorRegistrar({ load: () => import('@happy-dom/global-registrator') })], * }); * ``` */ declare function createGlobalRegistratorRegistrar(options: GlobalRegistratorOptions): DomRegistrar; export { type AngularResourceInlinerOptions, type DomRegistrar, type GlobalRegistratorOptions, type JsdomModule, type JsdomRegistrarOptions, type RegisterDomGlobalsOptions, copyWindowGlobals, createGlobalRegistratorRegistrar, createJsdomRegistrar, inlineAngularResources, registerDomGlobals };