user details', function(done) { // increased timeout because getUser sometimes takes a long time to complete this.timeout(5000); const promise = service.getUser(1) .then(user => { expect(user).to.not.be.null; }); expect(promise).to. eventually.be.fulfilled.and.notify(done); }); });