From da5071fc20d6498b0d0c8a7ee9cc4644f49b8f54 Mon Sep 17 00:00:00 2001 From: Matthieu Riegler Date: Sun, 16 Apr 2023 17:20:48 +0200 Subject: [PATCH] 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 --- packages/core/testing/src/ng_zone_mock.ts | 34 ------------------- packages/core/testing/src/testing_internal.ts | 1 - 2 files changed, 35 deletions(-) delete mode 100644 packages/core/testing/src/ng_zone_mock.ts diff --git a/packages/core/testing/src/ng_zone_mock.ts b/packages/core/testing/src/ng_zone_mock.ts deleted file mode 100644 index d0f4aa3da0b..00000000000 --- a/packages/core/testing/src/ng_zone_mock.ts +++ /dev/null @@ -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 = 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); - } -} diff --git a/packages/core/testing/src/testing_internal.ts b/packages/core/testing/src/testing_internal.ts index 1307ecf157c..510f7d3e9bc 100644 --- a/packages/core/testing/src/testing_internal.ts +++ b/packages/core/testing/src/testing_internal.ts @@ -9,4 +9,3 @@ export {inject} from './test_bed'; export * from './logger'; -export * from './ng_zone_mock';