@salesforce/sf-plugins-core
    Preparing search index...

    Function stubPrompter

    • Stub the SfCommand prompter.

      Parameters

      • sandbox: SinonSandbox

      Returns {
          confirm: SinonStub<[PromptInputs<boolean>], Promise<boolean>>;
          secret: SinonStub<[PromptInputs<string>], Promise<string>>;
      }

      import { stubPrompter } from '@salesforce/sf-plugins-core';
      let prompterStubs: ReturnType<typeof stubPrompter>;

      // inside your beforeEach, $$ is a SinonSandbox
      prompterStubs = stubPrompter($$.SANDBOX);

      // inside some test
      expect(prompterStubs.confirm.firstCall.args[0]).to.equal(
      messages.getMessage('confirmDelete', ['scratch', testOrg.username])
      );