Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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 ;-)");
});
it("Should continue if confirmation has been accepted", async () => {
inquirer.__setPrompt(true);
await lt.start();
expect(start).toBeCalledTimes(1);
});