You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1 lines
4.3 KiB

{"version":3,"file":"testing.d.ts","sources":["testing.d.ts"],"names":[],"mappings":"AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;;;;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AACA;AACA;AACA","sourcesContent":["/**\n * @license Angular v12.2.16\n * (c) 2010-2021 Google LLC. https://angular.io/\n * License: MIT\n */\n\nimport { ChildrenOutletContexts } from '@angular/router';\r\nimport { Compiler } from '@angular/core';\r\nimport { ExtraOptions } from '@angular/router';\r\nimport { Injector } from '@angular/core';\r\nimport { Location as Location_2 } from '@angular/common';\r\nimport { ModuleWithProviders } from '@angular/core';\r\nimport { NgModuleFactory } from '@angular/core';\r\nimport { NgModuleFactoryLoader } from '@angular/core';\r\nimport { Route } from '@angular/router';\r\nimport { Router } from '@angular/router';\r\nimport { Routes } from '@angular/router';\r\nimport { UrlHandlingStrategy } from '@angular/router';\r\nimport { UrlSerializer } from '@angular/router';\r\n\r\n/**\r\n * @description\r\n *\r\n * Sets up the router to be used for testing.\r\n *\r\n * The modules sets up the router to be used for testing.\r\n * It provides spy implementations of `Location`, `LocationStrategy`, and {@link\r\n * NgModuleFactoryLoader}.\r\n *\r\n * @usageNotes\r\n * ### Example\r\n *\r\n * ```\r\n * beforeEach(() => {\r\n * TestBed.configureTestingModule({\r\n * imports: [\r\n * RouterTestingModule.withRoutes(\r\n * [{path: '', component: BlankCmp}, {path: 'simple', component: SimpleCmp}]\r\n * )\r\n * ]\r\n * });\r\n * });\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class RouterTestingModule {\r\n static withRoutes(routes: Routes, config?: ExtraOptions): ModuleWithProviders<RouterTestingModule>;\r\n}\r\n\r\n/**\r\n * Router setup factory function used for testing.\r\n *\r\n * @publicApi\r\n */\r\nexport declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], opts?: ExtraOptions, urlHandlingStrategy?: UrlHandlingStrategy): Router;\r\n\r\n/**\r\n * Router setup factory function used for testing.\r\n *\r\n * @deprecated As of v5.2. The 2nd-to-last argument should be `ExtraOptions`, not\r\n * `UrlHandlingStrategy`\r\n * @publicApi\r\n */\r\nexport declare function setupTestingRouter(urlSerializer: UrlSerializer, contexts: ChildrenOutletContexts, location: Location_2, loader: NgModuleFactoryLoader, compiler: Compiler, injector: Injector, routes: Route[][], urlHandlingStrategy?: UrlHandlingStrategy): Router;\r\n\r\n/**\r\n * @description\r\n *\r\n * Allows to simulate the loading of ng modules in tests.\r\n *\r\n * ```\r\n * const loader = TestBed.inject(NgModuleFactoryLoader);\r\n *\r\n * @Component({template: 'lazy-loaded'})\r\n * class LazyLoadedComponent {}\r\n * @NgModule({\r\n * declarations: [LazyLoadedComponent],\r\n * imports: [RouterModule.forChild([{path: 'loaded', component: LazyLoadedComponent}])]\r\n * })\r\n *\r\n * class LoadedModule {}\r\n *\r\n * // sets up stubbedModules\r\n * loader.stubbedModules = {lazyModule: LoadedModule};\r\n *\r\n * router.resetConfig([\r\n * {path: 'lazy', loadChildren: 'lazyModule'},\r\n * ]);\r\n *\r\n * router.navigateByUrl('/lazy/loaded');\r\n * ```\r\n *\r\n * @publicApi\r\n */\r\nexport declare class SpyNgModuleFactoryLoader implements NgModuleFactoryLoader {\r\n private compiler;\r\n /**\r\n * @docsNotRequired\r\n */\r\n private _stubbedModules;\r\n /**\r\n * @docsNotRequired\r\n */\r\n set stubbedModules(modules: {\r\n [path: string]: any;\r\n });\r\n /**\r\n * @docsNotRequired\r\n */\r\n get stubbedModules(): {\r\n [path: string]: any;\r\n };\r\n constructor(compiler: Compiler);\r\n load(path: string): Promise<NgModuleFactory<any>>;\r\n}\r\n\r\nexport { }\r\n"]}