From 3723f107db1386a615dcb857927d94c7796a8567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miroslav=20Bajto=C5=A1?= Date: Fri, 2 Feb 2018 14:25:52 +0100 Subject: [PATCH] test: add missing "return" in a promise-style test Before this change, when the test failed, the rejected promise was not reported back to mocha and triggered "unhandled promise rejection" warning only. --- test/user.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/user.test.js b/test/user.test.js index 693939bf..a5ef88e4 100644 --- a/test/user.test.js +++ b/test/user.test.js @@ -1407,7 +1407,7 @@ describe('User', function() { }); it('changes the password - instance method', () => { - validCredentialsUser.changePassword(currentPassword, 'new password') + return validCredentialsUser.changePassword(currentPassword, 'new password') .then(() => { expect(arguments.length, 'changePassword promise resolution') .to.equal(0);