Port over server-event-test.js from node-xmpp