diff --git a/packages/client/index.js b/packages/client/index.js
index 70f55ae4..341d09e6 100644
--- a/packages/client/index.js
+++ b/packages/client/index.js
@@ -104,6 +104,10 @@ function client(options = {}) {
resource,
);
+ iqCallee?.get("urn:xmpp:ping", "ping", () => {
+ return {};
+ });
+
return Object.assign(entity, {
entity,
reconnect,
diff --git a/packages/client/test.js b/packages/client/test.js
new file mode 100644
index 00000000..3faa027e
--- /dev/null
+++ b/packages/client/test.js
@@ -0,0 +1,15 @@
+import { mockClient, promise } from "@xmpp/test";
+
+test("answers to ping requests", async () => {
+ const { entity } = mockClient();
+
+ entity.mockInput(
+
+
+ ,
+ );
+
+ expect(await promise(entity, "send")).toEqual(
+ ,
+ );
+});