From acdde4aa35339779146433cce3ff79e6fcc3b99b Mon Sep 17 00:00:00 2001 From: arturovt Date: Fri, 24 Jan 2025 16:43:57 +0200 Subject: [PATCH] refactor(router): remove unused code (#59704) This code is never used. PR Close #59704 --- .../testing/src/router_testing_module.ts | 25 +------------------ 1 file changed, 1 insertion(+), 24 deletions(-) diff --git a/packages/router/testing/src/router_testing_module.ts b/packages/router/testing/src/router_testing_module.ts index b540d4d9f57..56dc6eda52d 100644 --- a/packages/router/testing/src/router_testing_module.ts +++ b/packages/router/testing/src/router_testing_module.ts @@ -6,42 +6,19 @@ * found in the LICENSE file at https://angular.dev/license */ -import {Location} from '@angular/common'; import {provideLocationMocks} from '@angular/common/testing'; -import {Compiler, inject, Injector, ModuleWithProviders, NgModule} from '@angular/core'; +import {ModuleWithProviders, NgModule} from '@angular/core'; import { - ChildrenOutletContexts, ExtraOptions, NoPreloading, - Route, - Router, ROUTER_CONFIGURATION, - RouteReuseStrategy, RouterModule, ROUTES, Routes, - TitleStrategy, - UrlHandlingStrategy, - UrlSerializer, withPreloading, ɵROUTER_PROVIDERS as ROUTER_PROVIDERS, } from '@angular/router'; -function isUrlHandlingStrategy( - opts: ExtraOptions | UrlHandlingStrategy, -): opts is UrlHandlingStrategy { - // This property check is needed because UrlHandlingStrategy is an interface and doesn't exist at - // runtime. - return 'shouldProcessUrl' in opts; -} - -function throwInvalidConfigError(parameter: string): never { - throw new Error( - `Parameter ${parameter} does not match the one available in the injector. ` + - '`setupTestingRouter` is meant to be used as a factory function with dependencies coming from DI.', - ); -} - /** * @description *