You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In a unit test that calls ICommandHandler.process and mocks an ImperativeConfig.instance.config object with the exists: true property defined, several mocks are required which may be an inconvenience for plug-in developers.
After a short discussion, we wanted to reduce code duplication.
This might be a good enhancement for the cli-test-utils package.
We could add a few clever ways to mock these methods 😋
(not a good first issue 😅 )
In a unit test that calls
ICommandHandler.process
and mocks anImperativeConfig.instance.config
object with theexists: true
property defined, several mocks are required which may be an inconvenience for plug-in developers.For an example, see this sample plug-in unit test: zowe/zowe-cli-sample-plugin@a6b6d22#diff-c5dfd517fddad71ab1fe78c762be9a365f981aa118a4b3a72427717d679d634c
The following functions require mocks to be defined on the ImperativeConfig instance:
LoggerUtils.censorRawData
-envVariablePrefix
,config.api.layers.get
,config.api.secure.secureFields
ConfigAutoStore.findActiveProfile
-loadedConfig.profiles
The text was updated successfully, but these errors were encountered: