@@ -5,6 +5,7 @@ import type { ArgumentsCamelCase, Argv } from 'yargs'
55import type { DriversEndpoint , EdgeDriver } from '@smartthings/core-sdk'
66
77import type { CommandArgs } from '../../../../commands/edge/drivers/default.js'
8+ import type { buildEpilog } from '../../../../lib/help.js'
89import type { fatalError } from '../../../../lib/util.js'
910import type { APICommand , APICommandFlags } from '../../../../lib/command/api-command.js'
1011import type { CustomCommonOutputProducer } from '../../../../lib/command/format.js'
@@ -15,12 +16,17 @@ import { buildArgvMock, buildArgvMockStub } from '../../../test-lib/builder-mock
1516import { tableGeneratorMock } from '../../../test-lib/table-mock.js'
1617
1718
19+ const buildEpilogMock = jest . fn < typeof buildEpilog > ( )
20+ jest . unstable_mockModule ( '../../../../lib/help.js' , ( ) => ( {
21+ buildEpilog : buildEpilogMock ,
22+ } ) )
23+
1824const fatalErrorMock = jest . fn < typeof fatalError > ( ) . mockReturnValue ( 'never return' as never )
1925jest . unstable_mockModule ( '../../../../lib/util.js' , ( ) => ( {
2026 fatalError : fatalErrorMock ,
2127} ) )
2228
23- const { apiCommandMock, apiCommandBuilderMock, apiDocsURLMock } = apiCommandMocks ( '../../../..' )
29+ const { apiCommandMock, apiCommandBuilderMock } = apiCommandMocks ( '../../../..' )
2430
2531const outputItemOrListMock = jest . fn < typeof outputItemOrList < EdgeDriver > > ( )
2632const outputItemOrListBuilderMock = jest . fn < typeof outputItemOrListBuilder > ( )
@@ -62,7 +68,7 @@ test('builder', async () => {
6268 expect ( positionalMock ) . toHaveBeenCalledTimes ( 1 )
6369 expect ( optionMock ) . toHaveBeenCalledTimes ( 0 )
6470 expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
65- expect ( apiDocsURLMock ) . toHaveBeenCalledTimes ( 1 )
71+ expect ( buildEpilogMock ) . toHaveBeenCalledTimes ( 1 )
6672 expect ( epilogMock ) . toHaveBeenCalledTimes ( 1 )
6773} )
6874
0 commit comments