Don't drink anything while reading this.
The act itself is familiar to anyone who's ever watched comedy: One character takes a swig or bite of something just as another character says or does something shocking or outrageous, causing the first character to spew out the contents of his or her mouth. It's called a spit take.
Spit take is an act of suddenly spitting out liquid one is drinking in response to something funny or surprising:
'Spit take' originated as a showbiz term, but it's increasingly seen in general contexts.
‘If I'd been drinking something when she said that, I'd have done a spit take’