Files
Matthieu Riegler 0b14e4ef74 feat(router): exposes the fixture of the RouterTestingHarness (#50280)
The component exposed by the fixture is not important thus marked as `unknown`.

Exposing the fixture of the `RouterTestingHarness` allows to use the methods & properties of that fixture and makes it compatible with testing libraries relying on `ComponentFixture`

Fixes #48855

PR Close #50280
2023-06-14 15:27:25 +02:00

2.3 KiB

API Report File for "@angular/router_testing"

Do not edit this file. It is a report generated by API Extractor.


import { ChildrenOutletContexts } from '@angular/router';
import { Compiler } from '@angular/core';
import { ComponentFixture } from '@angular/core/testing';
import { DebugElement } from '@angular/core';
import { ExtraOptions } from '@angular/router';
import * as i0 from '@angular/core';
import * as i1 from '@angular/router';
import { Injector } from '@angular/core';
import { Location as Location_2 } from '@angular/common';
import { ModuleWithProviders } from '@angular/core';
import { Route } from '@angular/router';
import { Router } from '@angular/router';
import { RouteReuseStrategy } from '@angular/router';
import { Routes } from '@angular/router';
import { TitleStrategy } from '@angular/router';
import { Type } from '@angular/core';
import { UrlHandlingStrategy } from '@angular/router';
import { UrlSerializer } from '@angular/router';

// @public
export class RouterTestingHarness {
    static create(initialUrl?: string): Promise<RouterTestingHarness>;
    detectChanges(): void;
    readonly fixture: ComponentFixture<unknown>;
    navigateByUrl(url: string): Promise<null | {}>;
    navigateByUrl<T>(url: string, requiredRoutedComponentType: Type<T>): Promise<T>;
    get routeDebugElement(): DebugElement | null;
    get routeNativeElement(): HTMLElement | null;
}

// @public
export class RouterTestingModule {
    // (undocumented)
    static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;
    // (undocumented)
    static ɵfac: i0.ɵɵFactoryDeclaration<RouterTestingModule, never>;
    // (undocumented)
    static ɵinj: i0.ɵɵInjectorDeclaration<RouterTestingModule>;
    // (undocumented)
    static ɵmod: i0.ɵɵNgModuleDeclaration<RouterTestingModule, never, never, [typeof i1.RouterModule]>;
}

// @public @deprecated
export function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions | UrlHandlingStrategy | null, urlHandlingStrategy?: UrlHandlingStrategy, routeReuseStrategy?: RouteReuseStrategy, titleStrategy?: TitleStrategy): Router;

// (No @packageDocumentation comment for this package)