( mock: MockInitCmdPromptExpectation | MockInitCmdFlagsExpectation, debug = false )
| 170 | } |
| 171 | |
| 172 | export const initCommandNoOverwriteTester = async ( |
| 173 | mock: MockInitCmdPromptExpectation | MockInitCmdFlagsExpectation, |
| 174 | debug = false |
| 175 | ): Promise<void> => { |
| 176 | debug && logger.debug('******') |
| 177 | debug && logger.debug(`Test ${mock.methodToTest}`) |
| 178 | const InitCommand = await getInitCommand([''], 'aws') |
| 179 | await saveTestCloudGraphConfigFile(InitCommand, debug) |
| 180 | const response = await InitCommand[mock.methodToTest](mock.overwriteFlag) |
| 181 | debug && logger.debug(`response: ${JSON.stringify(response)}`) |
| 182 | debug && |
| 183 | logger.debug(`expectedResult: ${JSON.stringify(mock.expectedResult)}`) |
| 184 | expect(response).toMatchObject(mock.expectedResult) |
| 185 | } |
| 186 | |
| 187 | export const initCommandArgvGetterMethodTester = async ( |
| 188 | mock: MockInitCmdFlagsExpectation, |
no test coverage detected