From e171eb7669ec102eed007dee6befa14bd15a6398 Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 19 Aug 2020 09:23:10 +0200 Subject: [PATCH] core-api: fix usage of deprecated wait in tests --- .../OAuthRequestApi/OAuthPendingRequests.test.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.test.ts b/packages/core-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.test.ts index 36378798d4..280321daa0 100644 --- a/packages/core-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.test.ts +++ b/packages/core-api/src/apis/implementations/OAuthRequestApi/OAuthPendingRequests.test.ts @@ -14,7 +14,7 @@ * limitations under the License. */ -import { wait } from '@testing-library/react'; +import { waitFor } from '@testing-library/react'; import { OAuthPendingRequests } from './OAuthPendingRequests'; describe('OAuthPendingRequests', () => { @@ -27,7 +27,7 @@ describe('OAuthPendingRequests', () => { target.pending().subscribe({ next, error }); target.request(input); - await wait(() => expect(next).toBeCalledTimes(2)); + await waitFor(() => expect(next).toBeCalledTimes(2)); expect(next.mock.calls[0][0].scopes).toBeUndefined(); expect(next.mock.calls[1][0].scopes.toString()).toBe(input.toString()); expect(error.mock.calls.length).toBe(0);