@@ -10,17 +10,16 @@ import type {
1010} from '@smartthings/core-sdk'
1111
1212import type { WithOrganization , forAllOrganizations } from '../../lib/api-helpers.js'
13+ import type { buildEpilog } from '../../lib/help.js'
1314import type {
1415 APIOrganizationCommand ,
1516 APIOrganizationCommandFlags ,
1617 apiOrganizationCommand ,
1718 apiOrganizationCommandBuilder ,
1819} from '../../lib/command/api-organization-command.js'
19- import { AllOrganizationFlags , allOrganizationsBuilder } from '../../lib/command/common-flags.js'
20- import { outputItemOrList , outputItemOrListBuilder } from '../../lib/command/listing-io.js'
21- import { CommandArgs } from '../../commands/devicepreferences.js'
22- import { shortARNorURL , verboseApps } from '../../lib/command/util/apps-util.js'
23- import { apiCommandMocks } from '../test-lib/api-command-mock.js'
20+ import type { AllOrganizationFlags , allOrganizationsBuilder } from '../../lib/command/common-flags.js'
21+ import type { outputItemOrList , outputItemOrListBuilder } from '../../lib/command/listing-io.js'
22+ import type { CommandArgs } from '../../commands/devicepreferences.js'
2423import { buildArgvMock , buildArgvMockStub } from '../test-lib/builder-mock.js'
2524
2625
@@ -29,7 +28,10 @@ jest.unstable_mockModule('../../lib/api-helpers.js', () => ({
2928 forAllOrganizations : forAllOrganizationsMock ,
3029} ) )
3130
32- const { apiDocsURLMock } = apiCommandMocks ( '../..' )
31+ const buildEpilogMock = jest . fn < typeof buildEpilog > ( )
32+ jest . unstable_mockModule ( '../../lib/help.js' , ( ) => ( {
33+ buildEpilog : buildEpilogMock ,
34+ } ) )
3335
3436const apiOrganizationCommandMock = jest . fn < typeof apiOrganizationCommand > ( )
3537const apiOrganizationCommandBuilderMock = jest . fn < typeof apiOrganizationCommandBuilder > ( )
@@ -50,14 +52,6 @@ jest.unstable_mockModule('../../lib/command/listing-io.js', () => ({
5052 outputItemOrListBuilder : outputItemOrListBuilderMock ,
5153} ) )
5254
53- const shortARNorURLMock = jest . fn < typeof shortARNorURL > ( )
54- const verboseAppsMock = jest . fn < typeof verboseApps > ( )
55- jest . unstable_mockModule ( '../../lib/command/util/apps-util.js' , ( ) => ( {
56- shortARNorURL : shortARNorURLMock ,
57- verboseApps : verboseAppsMock ,
58- tableFieldDefinitions : [ ] ,
59- } ) )
60-
6155
6256const { default : cmd } = await import ( '../../commands/devicepreferences.js' )
6357
@@ -89,7 +83,7 @@ test('builder', () => {
8983 expect ( positionalMock ) . toHaveBeenCalledTimes ( 1 )
9084 expect ( optionMock ) . toHaveBeenCalledTimes ( 2 )
9185 expect ( exampleMock ) . toHaveBeenCalledTimes ( 1 )
92- expect ( apiDocsURLMock ) . toHaveBeenCalledTimes ( 1 )
86+ expect ( buildEpilogMock ) . toHaveBeenCalledTimes ( 1 )
9387 expect ( epilogMock ) . toHaveBeenCalledTimes ( 1 )
9488} )
9589
0 commit comments