@@ -3,16 +3,22 @@ import { jest } from '@jest/globals'
33import type { ArgumentsCamelCase , Argv } from 'yargs'
44
55import type { CommandArgs } from '../../../../commands/edge/channels/invites.js'
6+ import type { buildEpilog } from '../../../../lib/help.js'
67import type { APICommand , APICommandFlags } from '../../../../lib/command/api-command.js'
7- import { outputItemOrList , outputItemOrListBuilder } from '../../../../lib/command/listing-io.js'
8+ import type { edgeCommand , EdgeCommand } from '../../../../lib/command/edge-command.js'
9+ import type { outputItemOrList , outputItemOrListBuilder } from '../../../../lib/command/listing-io.js'
810import { listTableFieldDefinitions , tableFieldDefinitions } from '../../../../lib/command/util/edge-invites-table.js'
11+ import type { buildListFunction } from '../../../../lib/command/util/edge-invites-util.js'
12+ import type { Invitation , InvitesEndpoint } from '../../../../lib/edge/endpoints/invites.js'
913import { apiCommandMocks } from '../../../test-lib/api-command-mock.js'
1014import { buildArgvMock , buildArgvMockStub } from '../../../test-lib/builder-mock.js'
11- import { Invitation , InvitesEndpoint } from '../../../../lib/edge/endpoints/invites.js'
12- import type { edgeCommand , EdgeCommand } from '../../../../lib/command/edge-command.js'
13- import { buildListFunction } from '../../../../lib/command/util/edge-invites-util.js'
1415
1516
17+ const buildEpilogMock = jest . fn < typeof buildEpilog > ( )
18+ jest . unstable_mockModule ( '../../../../lib/help.js' , ( ) => ( {
19+ buildEpilog : buildEpilogMock ,
20+ } ) )
21+
1622const { apiCommandMock, apiCommandBuilderMock } = apiCommandMocks ( '../../../..' )
1723
1824const edgeCommandMock = jest . fn < typeof edgeCommand > ( )
@@ -43,6 +49,7 @@ test('builder', async () => {
4349 positionalMock,
4450 optionMock,
4551 exampleMock,
52+ epilogMock,
4653 argvMock,
4754 } = buildArgvMock < APICommandFlags , CommandArgs > ( )
4855
@@ -58,6 +65,8 @@ test('builder', async () => {
5865 expect ( positionalMock ) . toHaveBeenCalledTimes ( 1 )
5966 expect ( optionMock ) . toHaveBeenCalledTimes ( 1 )
6067 expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
68+ expect ( buildEpilogMock ) . toHaveBeenCalledTimes ( 1 )
69+ expect ( epilogMock ) . toHaveBeenCalledTimes ( 1 )
6170} )
6271
6372test ( 'handler' , async ( ) => {
0 commit comments