There is no situation where hiding that from your friend is the best thing to do. It's kind of laughable to even suggest that the best thing for someone might be to continue having their spouse cheat on them while their mutual friend knows and lies about it for the cheater. It's really as simple as putting yourself in the victim's place. Under what situation would it be in your best interest to not know? There's not one. There's only one thing to do in that situation and it's let you friend know what's going on behind their back because you would want them to do the same for you.