Add test coverage for sendBeacon() keepalive flag