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(() => {