diff --git a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts index 32527d4f502..a7cd27abbc7 100644 --- a/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts +++ b/packages/amplify-category-function/src/__tests__/provider-utils/awscloudformation/index.test.ts @@ -3,7 +3,7 @@ import { ServiceName } from '../../../provider-utils/awscloudformation/utils/con import open from 'open'; import { $TSContext, stateManager } from 'amplify-cli-core'; import { buildFunction } from '../../../provider-utils/awscloudformation/utils/buildFunction'; -import { getBuilder } from '../../../../lib'; +import { getBuilder } from '../../..'; import { BuildType } from 'amplify-function-plugin-interface'; jest.mock('amplify-cli-core'); @@ -18,7 +18,13 @@ stateManager_mock.getMeta.mockReturnValue({ }); jest.mock('open'); -jest.mock('../../../provider-utils/awscloudformation/utils/buildFunction'); +jest.mock('../../../provider-utils/awscloudformation/utils/buildFunction', () => ({ + buildFunction: jest.fn(), + buildTypeKeyMap: { + PROD: 'lastBuildTimeStamp', + DEV: 'lastDevBuildTimeStamp', + }, +})); const buildFunction_mock = buildFunction as jest.MockedFunction; describe('awscloudformation function provider', () => {