2021-06-28 19:54:20 +02:00
|
|
|
## API Report File for "@angular/common_testing"
|
2019-04-25 09:36:49 -05:00
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
> Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
|
|
|
|
|
|
|
|
```ts
|
|
|
|
|
|
|
|
import { InjectionToken } from '@angular/core';
|
2021-07-01 17:41:29 +02:00
|
|
|
import { Location as Location_2 } from '@angular/common';
|
2021-06-28 19:54:20 +02:00
|
|
|
import { LocationChangeListener } from '@angular/common';
|
|
|
|
import { LocationStrategy } from '@angular/common';
|
|
|
|
import { PlatformLocation } from '@angular/common';
|
|
|
|
import { SubscriptionLike } from 'rxjs';
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export const MOCK_PLATFORM_LOCATION_CONFIG: InjectionToken<MockPlatformLocationConfig>;
|
|
|
|
|
|
|
|
// @public
|
|
|
|
export class MockLocationStrategy extends LocationStrategy {
|
2016-07-20 17:51:21 -07:00
|
|
|
constructor();
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
back(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
forward(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
getBaseHref(): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-02-06 14:42:57 -08:00
|
|
|
getState(): unknown;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
internalBaseHref: string;
|
|
|
|
// (undocumented)
|
|
|
|
internalPath: string;
|
|
|
|
// (undocumented)
|
|
|
|
internalTitle: string;
|
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
onPopState(fn: (value: any) => void): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
path(includeHash?: boolean): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
prepareExternalUrl(internal: string): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
pushState(ctx: any, title: string, path: string, query: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
replaceState(ctx: any, title: string, path: string, query: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-07-20 17:51:21 -07:00
|
|
|
simulatePopState(url: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
urlChanges: string[];
|
2016-07-20 17:51:21 -07:00
|
|
|
}
|
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
|
|
|
export class MockPlatformLocation implements PlatformLocation {
|
2019-04-23 07:16:08 -07:00
|
|
|
constructor(config?: MockPlatformLocationConfig);
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
back(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
forward(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
getBaseHrefFromDOM(): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
getState(): unknown;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
get hash(): string;
|
|
|
|
// (undocumented)
|
2020-09-17 14:10:21 -04:00
|
|
|
historyGo(relativePosition?: number): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
get hostname(): string;
|
|
|
|
// (undocumented)
|
|
|
|
get href(): string;
|
|
|
|
// (undocumented)
|
2021-02-16 14:42:22 +02:00
|
|
|
onHashChange(fn: LocationChangeListener): VoidFunction;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2021-02-16 14:42:22 +02:00
|
|
|
onPopState(fn: LocationChangeListener): VoidFunction;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
get pathname(): string;
|
|
|
|
// (undocumented)
|
|
|
|
get port(): string;
|
|
|
|
// (undocumented)
|
|
|
|
get protocol(): string;
|
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
pushState(state: any, title: string, newUrl: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
replaceState(state: any, title: string, newUrl: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
get search(): string;
|
|
|
|
// (undocumented)
|
|
|
|
get state(): unknown;
|
|
|
|
// (undocumented)
|
|
|
|
get url(): string;
|
|
|
|
}
|
2019-04-23 07:16:08 -07:00
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
|
|
|
export interface MockPlatformLocationConfig {
|
|
|
|
// (undocumented)
|
2019-04-25 09:36:49 -05:00
|
|
|
appBaseHref?: string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-25 09:36:49 -05:00
|
|
|
startUrl?: string;
|
|
|
|
}
|
|
|
|
|
2021-06-28 19:54:20 +02:00
|
|
|
// @public
|
2021-07-01 17:41:29 +02:00
|
|
|
export class SpyLocation implements Location_2 {
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
back(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
forward(): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-02-06 14:42:57 -08:00
|
|
|
getState(): unknown;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2018-01-24 12:19:59 -05:00
|
|
|
go(path: string, query?: string, state?: any): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2020-09-17 14:10:21 -04:00
|
|
|
historyGo(relativePosition?: number): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-22 14:56:10 -07:00
|
|
|
isCurrentPathEqualTo(path: string, query?: string): boolean;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
normalize(url: string): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2019-04-23 07:16:08 -07:00
|
|
|
onUrlChange(fn: (url: string, state: unknown) => void): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
path(): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-22 14:56:10 -07:00
|
|
|
prepareExternalUrl(url: string): string;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2018-01-24 12:19:59 -05:00
|
|
|
replaceState(path: string, query?: string, state?: any): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
setBaseHref(url: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
setInitialPath(url: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
simulateHashChange(pathname: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2016-06-23 18:19:32 -07:00
|
|
|
simulateUrlPop(pathname: string): void;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
2018-02-27 17:06:06 -05:00
|
|
|
subscribe(onNext: (value: any) => void, onThrow?: ((error: any) => void) | null, onReturn?: (() => void) | null): SubscriptionLike;
|
2021-06-28 19:54:20 +02:00
|
|
|
// (undocumented)
|
|
|
|
urlChanges: string[];
|
2016-06-22 14:56:10 -07:00
|
|
|
}
|
2021-06-28 19:54:20 +02:00
|
|
|
|
|
|
|
|
|
|
|
// (No @packageDocumentation comment for this package)
|
|
|
|
|
|
|
|
```
|