-
Notifications
You must be signed in to change notification settings - Fork 324
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enhances command spo list remove #6378
Conversation
Thank you, we'll try to review it ASAP! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice start, let's do a few enhancements before we continue.
I have done rebase to main and added the commit. Is it fine or do I need to resolve anything from my end. Please guide me |
@ktskumar seems like something went horribly wrong while rebasing with the latest main. Could you have a look at it, please? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apart from a few comments, it looks good to go!
promptIssued = true; | ||
return Promise.resolve(false); | ||
//return Promise.resolve(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove comments
sinon.stub(request, 'post').callsFake(async (opts) => { | ||
requests.push(opts); | ||
if (opts.url === `${webUrl}/_api/web/lists/GetByTitle('${listTitle}')/recycle`) { | ||
return 'Correct URL'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This API doesn't return any result. Let's also return nothing in our stub.
requests.forEach(r => { | ||
if (r.url === `${webUrl}/_api/web/lists/GetByTitle('${listTitle}')/recycle`) { | ||
correctRequestIssued = true; | ||
} | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing this, let's use assert(postStub.calledOnce)
. This ensures that the request was called once and didn't throw an error.
Merged manually, thanks! |
closes #6270
In this PR, i have added a recycle option to
spo list remove
command