var Eventual = require('../../lib/eventual'); var events = new Eventual(); var ctx = events.createContext(); ctx .channel('core') .on('hello',(e) => { e.wait(); setTimeout(() => { console.log("Someone said hello?"); e.done(); },2000); }); ctx .channel('core') .emit('hello') .then((evt) => { console.log("evt: ", evt); });