UNPKG

shallow-render

Version:

Shallow rendering test utility for Angular

28 lines (27 loc) 1.25 kB
import { Type } from '@angular/core'; import { CustomError } from './custom-error'; import { RecursivePartial } from './recursive-partial'; import { Rendering, RenderOptions } from './rendering'; import { TestSetup } from './test-setup'; export declare class InvalidInputBindError extends CustomError { constructor(availableInputs: string[], key: string | symbol); } export declare class InvalidBindOnEntryComponentError extends CustomError { constructor(component: Type<any>); } export declare class MissingTestComponentError extends CustomError { constructor(testComponent: Type<any>); } export declare class Renderer<TComponent extends object> { private readonly _setup; constructor(_setup: TestSetup<TComponent>); private _createTemplateString; render<TBindings extends RecursivePartial<TComponent>>(options: Partial<RenderOptions<TBindings>>): Promise<Rendering<TComponent, TBindings>>; render<TBindings>(template?: string, options?: Partial<RenderOptions<TBindings>>): Promise<Rendering<TComponent, TBindings>>; private _spyOnOutputs; private _verifyComponentBindings; private _runComponentLifecycle; private _getElement; private _getInstance; private _getStructuralDirectiveInstance; }