I am running my collection and in one case I want to clear the cookie(clear login session) programmatically. I followed the documentation provided by postman (https://learning.getpostman.com/docs/postman/sending-api-requests/cookies/) but that does not seem to be working. Is there any way to delete the cookies programmatically in my postman.
I am using the following code in the "Tests" tab of postman
const cookieJar = pm.cookies.jar();
cookieJar.unset(url, "cookiename", function (error) {
});
When I hit send it shows "There was an error in evaluating the test script: TypeError: cookieJar.unset is not a function" in the console and when I go to cookies in postman the cookie is not getting deleted