How to use the inquirer.__setPrompt function in inquirer

To help you get started, we’ve selected a few inquirer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github SockTrader / SockTrader / src / __tests__ / cli / liveTrading.spec.ts View on Github external
it("Should stop if confirmation has been denied", async () => {
        inquirer.__setPrompt(false);

        await lt.start();

        expect(start).toBeCalledTimes(0);
        expect(spyConsole).toBeCalledWith("We just saved you a few bucks. No harm is done, thank me later ;-)");
    });
github SockTrader / SockTrader / src / __tests__ / cli / liveTrading.spec.ts View on Github external
it("Should continue if confirmation has been accepted", async () => {
        inquirer.__setPrompt(true);

        await lt.start();

        expect(start).toBeCalledTimes(1);
    });