From c39db561ec6b866aea491246dbba3ddf5439d2f3 Mon Sep 17 00:00:00 2001 From: Chris F <5827964+cshfang@users.noreply.github.com> Date: Thu, 14 Sep 2023 01:40:55 -0700 Subject: [PATCH] fix: Update test references to removed export (#12042) * fix: Update test references to removed export * Revert updated casing from another PR --- .../__tests__/runWithAmplifyServerContext.test.ts | 2 +- .../providers/cognito/credentialsProvider.test.ts | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/adapter-nextjs/__tests__/runWithAmplifyServerContext.test.ts b/packages/adapter-nextjs/__tests__/runWithAmplifyServerContext.test.ts index f09284932b7..24daac1f39a 100644 --- a/packages/adapter-nextjs/__tests__/runWithAmplifyServerContext.test.ts +++ b/packages/adapter-nextjs/__tests__/runWithAmplifyServerContext.test.ts @@ -74,7 +74,7 @@ describe('runWithAmplifyServerContext', () => { describe('when amplifyConfig.Auth is defined', () => { describe('when nextServerContext is null (opt-in unauthenticated role)', () => { - it('should create auth providers with MemoryKeyValueStorage', () => { + it('should create auth providers with sharedInMemoryStorage', () => { const operation = jest.fn(); runWithAmplifyServerContext({ operation, nextServerContext: null }); expect( diff --git a/packages/auth/__tests__/providers/cognito/credentialsProvider.test.ts b/packages/auth/__tests__/providers/cognito/credentialsProvider.test.ts index e0e64522e17..916c0e0f194 100644 --- a/packages/auth/__tests__/providers/cognito/credentialsProvider.test.ts +++ b/packages/auth/__tests__/providers/cognito/credentialsProvider.test.ts @@ -10,9 +10,9 @@ import { AuthError } from '../../../src/errors/AuthError'; import { GetCredentialsForIdentityInput, GetCredentialsForIdentityOutput, - MemoryKeyValueStorage, ResourcesConfig, getCredentialsForIdentity, + sharedInMemoryStorage, } from '@aws-amplify/core'; jest.mock('@aws-amplify/core', () => ({ @@ -73,7 +73,7 @@ describe('Guest Credentials', () => { beforeEach(() => { cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider( - new DefaultIdentityIdStore(MemoryKeyValueStorage) + new DefaultIdentityIdStore(sharedInMemoryStorage) ); credentialsForIdentityIdSpy.mockImplementationOnce( async ({}, params: GetCredentialsForIdentityInput) => { @@ -125,7 +125,7 @@ describe('Guest Credentials', () => { beforeEach(() => { cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider( - new DefaultIdentityIdStore(MemoryKeyValueStorage) + new DefaultIdentityIdStore(sharedInMemoryStorage) ); credentialsForIdentityIdSpy.mockImplementationOnce( async ({}, params: GetCredentialsForIdentityInput) => { @@ -164,7 +164,7 @@ describe('Primary Credentials', () => { beforeEach(() => { cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider( - new DefaultIdentityIdStore(MemoryKeyValueStorage) + new DefaultIdentityIdStore(sharedInMemoryStorage) ); credentialsForIdentityIdSpy.mockImplementation( async ({}, params: GetCredentialsForIdentityInput) => { @@ -245,7 +245,7 @@ describe('Primary Credentials', () => { beforeEach(() => { cognitoCredentialsProvider = new CognitoAWSCredentialsAndIdentityIdProvider( - new DefaultIdentityIdStore(MemoryKeyValueStorage) + new DefaultIdentityIdStore(sharedInMemoryStorage) ); }); afterEach(() => {