That’s why they have self-tests. Learned that one the hard way myself.
My UPS was supposedly "self testing" itself periodically and it still happened!
Oof, sorry.