mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
3fa7b2b136
This commit updates scripts within `packages/common` to relative imports as a prep work to the upcoming infra updates. PR Close #60623
23 lines
826 B
TypeScript
23 lines
826 B
TypeScript
/**
|
|
* @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 {MockLocationStrategy, provideLocationMocks, SpyLocation} from '../../testing';
|
|
import {TestBed} from '@angular/core/testing';
|
|
|
|
describe('provideLocationMocks() function', () => {
|
|
it('should mock Location and LocationStrategy classes', () => {
|
|
TestBed.configureTestingModule({providers: [provideLocationMocks()]});
|
|
const location = TestBed.inject(Location);
|
|
const locationStrategy = TestBed.inject(LocationStrategy);
|
|
|
|
expect(location).toBeInstanceOf(SpyLocation);
|
|
expect(locationStrategy).toBeInstanceOf(MockLocationStrategy);
|
|
});
|
|
});
|