mirror of
https://github.com/angular/angular.git
synced 2026-09-14 13:54:52 +08:00
refactor(common): remove duplicate helper function
We have `useAutoTick` in our private shared utils.
(cherry picked from commit 36474f7011)
This commit is contained in:
committed by
Alex Rickabaugh
parent
a3fb4fe052
commit
6dcb534e12
@@ -6,7 +6,6 @@
|
||||
* found in the LICENSE file at https://angular.dev/license
|
||||
*/
|
||||
|
||||
import {AsyncPipe} from '../../index';
|
||||
import {
|
||||
ChangeDetectorRef,
|
||||
Component,
|
||||
@@ -16,8 +15,9 @@ import {
|
||||
signal,
|
||||
} from '@angular/core';
|
||||
import {TestBed} from '@angular/core/testing';
|
||||
import {useAutoTick} from '@angular/private/testing';
|
||||
import {Observable, of, Subscribable, Unsubscribable} from 'rxjs';
|
||||
import {useAutoTick} from './util';
|
||||
import {AsyncPipe} from '../../index';
|
||||
|
||||
describe('AsyncPipe', () => {
|
||||
let pipe: AsyncPipe;
|
||||
|
||||
@@ -11,13 +11,3 @@ export async function timeout(ms?: number): Promise<void> {
|
||||
setTimeout(resolve, ms);
|
||||
});
|
||||
}
|
||||
|
||||
export function useAutoTick() {
|
||||
beforeEach(() => {
|
||||
jasmine.clock().install();
|
||||
jasmine.clock().autoTick();
|
||||
});
|
||||
afterEach(() => {
|
||||
jasmine.clock().uninstall();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user