MCPcopy Index your code
hub / github.com/cloudgraphdev/cli / initCommandArgvGetterMethodTester

Function initCommandArgvGetterMethodTester

test/helpers/index.ts:187–200  ·  view source on GitHub ↗
(
  mock: MockInitCmdFlagsExpectation,
  debug = false
)

Source from the content-addressed store, hash-verified

185}
186
187export const initCommandArgvGetterMethodTester = async (
188 mock: MockInitCmdFlagsExpectation,
189 debug = false
190): Promise<void> => {
191 debug && logger.debug('******')
192 debug && logger.debug(`Test ${mock.methodToTest}`)
193 debug && logger.debug(`argvList: ${JSON.stringify(mock.argvList)}`)
194 const Init = await getInitCommand(mock.argvList, 'aws')
195 const response = await Init[mock.methodToTest](mock.overwriteFlag)
196 debug && logger.debug(`response: ${JSON.stringify(response)}`)
197 expect(response).toMatchObject(mock.expectedResult)
198 debug &&
199 logger.debug(`expectedResult: ${JSON.stringify(mock.expectedResult)}`)
200}
201
202export const removeConfigFile = (debug = false): void => {
203 const filePath = path.join(configDir, '.cloud-graphrc.json')

Callers 1

init.test.tsFile · 0.90

Calls 1

getInitCommandFunction · 0.85

Tested by

no test coverage detected