Of course this isn't really automatic and triggered by the smallest thing, both sides kind of have to "agree" to be at war, e.g. by a counter-attack, a declaration following the attack or something like that. And nobody really wants to take that bait, due to the huge consequences involved.
Yet, it is China playing with fire here, we all can be happy that none of the affected nations took them up on their "offer" of war.