-
-
Notifications
You must be signed in to change notification settings - Fork 5
Built in codes
Farhan Reza edited this page Feb 21, 2024
·
2 revisions
Welcome to the if-follow-package wiki👋
// Test case: user is a follower
const result1 = followController.isFollower('spirito7phil');
result1.then((result) => {
console.log(result); // Output: "Yes, spirito7phil follows you!" Or
// "No, spirito7phil does not follow you!"
});
// Test case: user is not a follower
const result2 = followController.isFollower('sindresorhus');
result2.then((result) => {
console.log(result); // Output: "No, sindresorhus does not follow you!" Or
// "Yes, sindresorhus follows you!"
});
// Test case: user is followed
const result3 = followController.isFollowing('spirito7phil');
result3.then((result) => {
console.log(result); // Output: "Yes, you follow spirito7phil!" Or
// "No, you do not follow spirito7phil!"
});
// Test case: user is not followed
const result4 = followController.isFollowing('anaseem80');
result4.then((result) => {
console.log(result); // Output: "No, you do not follow anaseem80!" Or
// "Yes, you follow anaseem80!"
});
const result5 = followController.totalFollowers();
result5.then((result) => {
console.log(result); // Output: "Your total Followers: 1657(depends on your account)"
});
const result6 = followController.totalFollowings();
result6.then((result) => {
console.log(result); // Output: "Your total Followings: 1067`(depends on your account)
});
const result7 = followController.whoNotFollowingBack();
result7.then((result) => {
console.log(result); // Output: ["sindresorhus", "getify", "username4", "usernameN"](depends on your account)
});
const result8 = followController.whoFollowingBack();
result8.then((result) => {
console.log(result); // Output: ["spirito7phil", "username2", "username3", "usernameN"](depends on your account)
});
// Test case: user is following back
const result9 = followController.isFollowingBack('spirito7phil');
result9.then((result) => {
console.log(result); // Output: "Yes, spirito7phil following back!" Or
// "No, spirito7phil does not following back!"
});
// Test case: user is not following back
const result10 = followController.isFollowingBack('sindresorhus');
result10.then((result) => {
console.log(result); // Output: "No, sindresorhus does not following back!" Or
// "Yes, sindresorhus following back!"
});
// Test case: unfollow a user who is not following back
const result11 = followController.unfollowNotFollowingBack('sindresorhus');
//Console Output: "Unfollowed: sindresorhus"(depends on your account)
// Test case: unfollow all users who are not following back
const result12 = followController.unfollowAllNotFollowingBack();
/* Console Output: "Unfollowed: getify"
"Unfollowed: username2"
"Unfollowed: username3"
"Unfollowed: usernameN"*/(depends on your account)