I'm going to joke that our friend is racist
Are you serious? Why would you joke about someone being racist?
I'm going to joke that he's racist because he gave a bad review of a Mexican restaurant.
Slandering your friends as racist when they aren't will hurt their reputation. Even if you say that you are joking, people might think that there is a hint of truth behind what you say about your friend. Rather than joke about your friend as racist due to his restaurant review, look for other ways of gently chastising your friend if you think his review was too critical.
I found out he hates Chinese people, so that's why I'm going to say that he's racist.
Oh my, that is quite a revelation then. But he's still your friend, and wouldn't you think it'd be too extreme to just joke around about it? How about telling him how his behavior is problematic, so he won't do racist things again?