mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
refactor(core): Remove ununsed Zone mock from testing internals. (#49873)
The last time it was used in was on the v10 branch. PR Close #49873
This commit is contained in:
parent
b7392f9064
commit
da5071fc20
2 changed files with 0 additions and 35 deletions
|
|
@ -1,34 +0,0 @@
|
|||
/**
|
||||
* @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.io/license
|
||||
*/
|
||||
|
||||
import {EventEmitter, Injectable, NgZone} from '@angular/core';
|
||||
|
||||
|
||||
/**
|
||||
* A mock implementation of {@link NgZone}.
|
||||
*/
|
||||
@Injectable()
|
||||
export class MockNgZone extends NgZone {
|
||||
override onStable: EventEmitter<any> = new EventEmitter(false);
|
||||
|
||||
constructor() {
|
||||
super({enableLongStackTrace: false, shouldCoalesceEventChangeDetection: false});
|
||||
}
|
||||
|
||||
override run(fn: Function): any {
|
||||
return fn();
|
||||
}
|
||||
|
||||
override runOutsideAngular(fn: Function): any {
|
||||
return fn();
|
||||
}
|
||||
|
||||
simulateZoneExit(): void {
|
||||
this.onStable.emit(null);
|
||||
}
|
||||
}
|
||||
|
|
@ -9,4 +9,3 @@
|
|||
export {inject} from './test_bed';
|
||||
|
||||
export * from './logger';
|
||||
export * from './ng_zone_mock';
|
||||
|
|
|
|||
Loading…
Reference in a new issue