Add an isClosing guard for closing native websockets
Made the isClosing detection more robust
Test that we have received 4 assertions before declaring success