@@ -4,8 +4,9 @@ import type { join } from 'node:path'
44
55import type { ArgumentsCamelCase , Argv } from 'yargs'
66
7- import type { Profile , ProfilesByName } from '../../lib/cli-config.js'
87import type { CommandArgs } from '../../commands/config.js'
8+ import type { Profile , ProfilesByName } from '../../lib/cli-config.js'
9+ import type { buildEpilog } from '../../lib/help.js'
910import type { stringTranslateToId } from '../../lib/command/command-util.js'
1011import type { TableCommonListOutputProducer , TableCommonOutputProducer } from '../../lib/command/format.js'
1112import type { outputItemOrListBuilder } from '../../lib/command/listing-io.js'
@@ -32,6 +33,11 @@ jest.unstable_mockModule('node:path', () => ({
3233 join : joinMock ,
3334} ) )
3435
36+ const buildEpilogMock = jest . fn < typeof buildEpilog > ( )
37+ jest . unstable_mockModule ( '../../lib/help.js' , ( ) => ( {
38+ buildEpilog : buildEpilogMock ,
39+ } ) )
40+
3541const stringTranslateToIdMock = jest . fn < typeof stringTranslateToId > ( )
3642jest . unstable_mockModule ( '../../lib/command/command-util.js' , ( ) => ( {
3743 stringTranslateToId : stringTranslateToIdMock ,
@@ -84,6 +90,7 @@ test('builder', () => {
8490 positionalMock,
8591 optionMock,
8692 exampleMock,
93+ epilogMock,
8794 argvMock,
8895 } = buildArgvMock < SmartThingsCommandFlags , BuildOutputFormatterFlags > ( )
8996
@@ -96,6 +103,9 @@ test('builder', () => {
96103 expect ( positionalMock ) . toHaveBeenCalledTimes ( 1 )
97104 expect ( optionMock ) . toHaveBeenCalledTimes ( 1 )
98105 expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
106+ expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
107+ expect ( buildEpilogMock ) . toHaveBeenCalledTimes ( 1 )
108+ expect ( epilogMock ) . toHaveBeenCalledTimes ( 1 )
99109} )
100110
101111describe ( 'handler' , ( ) => {
0 commit comments