@hallparty/xmpp-jid
Version:
XMPP identifiers (JID) for JavaScript
15 lines (9 loc) • 397 B
JavaScript
;
const test = require("ava");
const JID = require("../lib/JID");
test("throws TypeError for invalid domain", (t) => {
t.throws(() => new JID("foo"), { instanceOf: TypeError });
t.throws(() => new JID(), { instanceOf: TypeError });
t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError });
t.throws(() => new JID("foo", "", "r"), { instanceOf: TypeError });
});