testEctStatusEventListenerMethod = method => {
    expect(method).toBeCalledTimes(1);
    expect(method.mock.calls[0][0]).toEqual('change');
    expect(method.mock.calls[0][1].constructor).toEqual(Function);
  }
Tests that addEventListener or removeEventListener was called during the
lifecycle of the useEffect hook within useNetworkStatus