@@ -2,10 +2,7 @@ import { beforeEach, describe, it, mock } from 'node:test';
22import assert from 'assert' ;
33import { NoSuchKey , S3 , S3ServiceException } from '@aws-sdk/client-s3' ;
44
5- import {
6- getAmplifyClientsConfiguration ,
7- getAmplifyClientsConfigurationRetriever ,
8- } from './get_amplify_clients_configuration.js' ;
5+ import { getAmplifyClientsConfiguration } from './get_amplify_clients_configuration.js' ;
96
107const validEnv = {
118 AMPLIFY_DATA_MODEL_INTROSPECTION_SCHEMA_BUCKET_NAME :
@@ -53,8 +50,7 @@ void describe('getAmplifyClientsConfiguration', () => {
5350 mock . method ( mockS3Client , 'send' , s3ClientSendMock ) ;
5451
5552 await assert . rejects (
56- async ( ) =>
57- await getAmplifyClientsConfigurationRetriever ( validEnv , mockS3Client ) ,
53+ async ( ) => await getAmplifyClientsConfiguration ( validEnv , mockS3Client ) ,
5854 new Error (
5955 'Error retrieving the schema from S3. Please confirm that your project has a `defineData` included in the `defineBackend` definition.'
6056 )
@@ -73,8 +69,7 @@ void describe('getAmplifyClientsConfiguration', () => {
7369 mock . method ( mockS3Client , 'send' , s3ClientSendMock ) ;
7470
7571 await assert . rejects (
76- async ( ) =>
77- await getAmplifyClientsConfigurationRetriever ( validEnv , mockS3Client ) ,
72+ async ( ) => await getAmplifyClientsConfiguration ( validEnv , mockS3Client ) ,
7873 new Error (
7974 'Error retrieving the schema from S3. You may need to grant this function authorization on the schema. TEST_ERROR: TEST_MESSAGE.'
8075 )
@@ -88,8 +83,7 @@ void describe('getAmplifyClientsConfiguration', () => {
8883 mock . method ( mockS3Client , 'send' , s3ClientSendMock ) ;
8984
9085 await assert . rejects (
91- async ( ) =>
92- await getAmplifyClientsConfigurationRetriever ( validEnv , mockS3Client ) ,
86+ async ( ) => await getAmplifyClientsConfiguration ( validEnv , mockS3Client ) ,
9387 new Error ( 'Test Error' )
9488 ) ;
9589 } ) ;
@@ -105,7 +99,7 @@ void describe('getAmplifyClientsConfiguration', () => {
10599 mock . method ( mockS3Client , 'send' , s3ClientSendMock ) ;
106100
107101 const { resourceConfig, libraryOptions } =
108- await getAmplifyClientsConfigurationRetriever ( validEnv , mockS3Client ) ;
102+ await getAmplifyClientsConfiguration ( validEnv , mockS3Client ) ;
109103
110104 assert . deepEqual (
111105 await libraryOptions . Auth . credentialsProvider . getCredentialsAndIdentityId ?.( ) ,
0 commit comments