2025-11-05 17:04:23 -03:00

12 lines
314 B
JavaScript

import { Client } from "@xmpp/client-core";
import Connection from "@xmpp/connection";
import context from "./context.js";
export default function mockClient(options) {
const xmpp = new Client(options);
xmpp.send = Connection.prototype.send;
const ctx = context(xmpp);
return Object.assign(xmpp, ctx);
}