From 1eb38ce920aecda3483b8528dee2afc38ba82d34 Mon Sep 17 00:00:00 2001 From: Colum Ferry Date: Mon, 30 Jan 2023 13:09:20 +0000 Subject: [PATCH] fix(angular): deprecate the testing utils (#14691) --- packages/angular/testing/src/testing-utils.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/angular/testing/src/testing-utils.ts b/packages/angular/testing/src/testing-utils.ts index 1b007bab72..303fc0a0fc 100644 --- a/packages/angular/testing/src/testing-utils.ts +++ b/packages/angular/testing/src/testing-utils.ts @@ -2,6 +2,8 @@ import type { Observable } from 'rxjs'; import { first, toArray } from 'rxjs/operators'; /** + * @deprecated This will be removed in a later version of Nx. Since RxJS 7, use firstValueFrom(obs$.pipe(toArray())) or lastValueFrom(obs$.pipe(toArray())). + * * @whatItDoes reads all the values from an observable and returns a promise * with an array of all values. This should be used in combination with async/await. * @@ -18,6 +20,8 @@ export function readAll(o: Observable): Promise { } /** + * @deprecated This will be removed in a later version of Nx. Since RxJS 7, use firstValueFrom(obs$) + * * @whatItDoes reads the first value from an observable and returns a promise * with it. This should be used in combination with async/await. *