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

Function getInitCommand

test/helpers/index.ts:57–79  ·  view source on GitHub ↗
(
  argv: any = [''],
  providerName = ''
)

Source from the content-addressed store, hash-verified

55}
56
57export const getInitCommand = async (
58 argv: any = [''],
59 providerName = ''
60): Promise<InitCommandClass> => {
61 const { version } = await setConfigCommand()
62 // Mock the provider module
63 InitCommandClass.prototype.getProviderClient = jest.fn(async function () {
64 return { client: Provider, schemaMap: {} }
65 })
66 InitCommandClass.prototype.checkProviderConfig = jest.fn(async function () {
67 return configFileMock.aws as any
68 })
69 InitCommandClass.prototype.getProvider = jest.fn(async function () {
70 return providerName
71 })
72 InitCommandClass.prototype.providers = {}
73 InitCommandClass.prototype.providers.aws = jest.fn()
74 const initCommand = new InitCommandClass(argv, { root })
75 initCommand.config.configDir = configDir
76 initCommand.config.dataDir = dataDir
77 initCommand.config.version = version
78 return initCommand
79}
80
81export const getServeCommand = async (
82 argv: any = ['']

Callers 9

init.test.tsFile · 0.90
launch.test.tsFile · 0.90
serve.test.tsFile · 0.90
teardown.test.tsFile · 0.90
flagTestHelperFunction · 0.85
runInitCommandTesterFunction · 0.85

Calls 1

setConfigCommandFunction · 0.85

Tested by

no test coverage detected