Skip to content

Commit

Permalink
fixed early access test case
Browse files Browse the repository at this point in the history
  • Loading branch information
shafeeqd959 committed Feb 1, 2024
1 parent 4fa5161 commit e06bb24
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,6 @@ describe('base-branch command', function () {
const branchStub = stub(cliux, 'table').callsFake(() => {});
await BranchGetCommand.run([]);
expect(branchStub.calledOnce).to.be.true;
branchStub.restore();
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ describe('Early access header command', function () {
setEarlyAccessHeaderMockData.flags.headerAlias,
];
await RemoveEarlyAccessHeaderCommand.run(args);
expect(confirmationStub.calledOnce).to.be.true;
configGetStub.restore();
expect(confirmationStub.calledOnce).to.be.true;
configGetStub.restore();
confirmationStub.restore()
});

it('Remove early access header: without alias flag should prompt', async function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@ describe('Delete config', () => {
const config = configHandler;
const getConfig = config.get(`baseBranch.${removeConfigMockData.flags.apiKey}`);

const askConfirmation = stub(interactive, 'askConfirmation').calledOnce;
const askConfirmation = stub(interactive, 'askConfirmation');
const showSuccess = stub(cliux, 'success');
await RemoveBranchConfigCommand.run(['--stack-api-key', removeConfigMockData.flags.apiKey]);
if (getConfig && askConfirmation) expect(showSuccess.calledOnce).to.be.true;
if (getConfig && askConfirmation.calledOnce) expect(showSuccess.calledOnce).to.be.true;
askConfirmation.restore();
});
});

0 comments on commit e06bb24

Please sign in to comment.