Skip to content

Commit

Permalink
test: fix new func test
Browse files Browse the repository at this point in the history
  • Loading branch information
edwardfoyle committed Feb 1, 2021
1 parent 19cd69d commit e106da1
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand All @@ -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<typeof buildFunction>;

describe('awscloudformation function provider', () => {
Expand Down

0 comments on commit e106da1

Please sign in to comment.