Skip to content

Commit 878de70

Browse files
committed
Fix references to getManifestData function`
1 parent 973b30d commit 878de70

3 files changed

Lines changed: 7 additions & 5 deletions

File tree

src/App-slack-function.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ function withNoopAppMetadata(): Override {
9393
export default function withMockValidManifestUtil(functionCallbackId: string): Override {
9494
const mockManifestOutput = JSON.parse(`{"functions": {"${functionCallbackId}": {}}}`);
9595
return {
96-
'./cli/hook-utils/manifest': {
96+
'./cli/hook-utils/get-manifest-data': {
9797
getManifestData: () => mockManifestOutput,
9898
},
9999
};

src/SlackFunction.spec.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ describe('SlackFunction utils', () => {
346346
};
347347
const getManifestSpy = sinon.spy(() => badManifestOutput);
348348
const { findMatchingManifestDefinition } = await importSlackFunctionModule({
349-
'./cli/hook-utils/manifest': {
349+
'./cli/hook-utils/get-manifest-data': {
350350
getManifestData: getManifestSpy,
351351
},
352352
});
@@ -363,7 +363,7 @@ describe('SlackFunction utils', () => {
363363
},
364364
};
365365
const { findMatchingManifestDefinition } = await importSlackFunctionModule({
366-
'./cli/hook-utils/manifest': {
366+
'./cli/hook-utils/get-manifest-data': {
367367
getManifestData: () => mockManifestOutput,
368368
},
369369
});
@@ -379,7 +379,7 @@ describe('SlackFunction utils', () => {
379379
},
380380
};
381381
const { findMatchingManifestDefinition } = await importSlackFunctionModule({
382-
'./cli/hook-utils/manifest': {
382+
'./cli/hook-utils/get-manifest-data': {
383383
getManifestData: () => mockManifestOutput,
384384
},
385385
});

src/SlackFunction.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ import {
2424

2525
// eslint-disable-next-line
2626
export const manifestUtil = require('./cli/hook-utils/manifest');
27+
// eslint-disable-next-line
28+
export const getManifestDataUtil = require('./cli/hook-utils/get-manifest-data');
2729

2830
/* Types */
2931
export interface SlackFunctionExecutedMiddlewareArgs extends SlackEventMiddlewareArgs<'function_executed'> {
@@ -506,7 +508,7 @@ export function hasMatchingManifestDefinition(
506508
export function findMatchingManifestDefinition(callbackId: string): ManifestDefinitionResult {
507509
const result: ManifestDefinitionResult = { matchFound: false, fnKeys: [] };
508510
// call the hook to get the manifest
509-
const manifest = manifestUtil.getManifestData(process.cwd());
511+
const manifest = getManifestDataUtil.getManifestData(process.cwd());
510512

511513
// manifest file must exist in the project
512514
if (!('functions' in manifest)) {

0 commit comments

Comments
 (0)