test('gets blueprint list helper', () => { const yargs = {}; const argv = { _: ['generate'] }; handlers.handleHelp(argv, yargs); expect(helpers.getBlueprintHelper).not.toHaveBeenCalled(); expect(helpers.getBlueprintListHelper).toHaveBeenCalled(); expect(helpers.getBlueprintListHelper.mock.calls[0][0]).toBe(yargs); expect(showHelp).toHaveBeenCalled(); });
test('ignores unknown blueprint', () => { const yargs = {}; const argv = { _: ['generate', 'unknown_blueprint_name'] }; helpers.getBlueprintHelper.mockImplementation(() => undefined); handlers.handleHelp(argv, yargs); expect(helpers.getBlueprintListHelper).not.toHaveBeenCalled(); expect(helpers.getBlueprintHelper).toHaveBeenCalled(); expect(showHelp).not.toHaveBeenCalled(); });