/
githubmirror
/
angular
Обзор
Документация
Войти
/
githubmirror
/
angular
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
packages/common/testing/src/provide_location_mocks.ts
26 строк
765 B
Andrew Kushnir
refactor(common): convert scripts within `packages/common` to relative imports (#60623)
01 апр 2025, 18:58
01 апр 2025, 18:58
3fa7b2b
Код
Авторство
О чём код?
/** * @license * Copyright Google LLC All Rights Reserved. * * Use of this source code is governed by an MIT-style license that can be * found in the LICENSE file at https://angular.dev/license */ import {Location, LocationStrategy} from '../../index'; import {Provider} from '@angular/core'; import {SpyLocation} from './location_mock'; import {MockLocationStrategy} from './mock_location_strategy'; /** * Returns mock providers for the `Location` and `LocationStrategy` classes. * The mocks are helpful in tests to fire simulated location events. * * @publicApi */ export function provideLocationMocks(): Provider[] { return [ {provide: Location, useClass: SpyLocation}, {provide: LocationStrategy, useClass: MockLocationStrategy}, ]; }