From f321aba4ac912946067091091448ce3e6128e774 Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Tue, 26 Mar 2019 12:46:26 +0000 Subject: [PATCH] Convert away from `Promise.defer` `Promise.defer` is deprecated in Bluebird and it logs loudly each time it's called. This cleans up testing logs significantly by converting away from it. --- test/app-tests/loading.js | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/test/app-tests/loading.js b/test/app-tests/loading.js index 7840d776..c3afc07d 100644 --- a/test/app-tests/loading.js +++ b/test/app-tests/loading.js @@ -123,9 +123,6 @@ describe('loading:', function() { toString: function() { return this.search + this.hash; }, }; - const tokenLoginCompleteDefer = Promise.defer(); - tokenLoginCompletePromise = tokenLoginCompleteDefer.promise; - function onNewScreen(screen) { console.log(Date.now() + " newscreen "+screen); const hash = '#/' + screen; @@ -157,18 +154,21 @@ describe('loading:', function() { PlatformPeg.set(new WebPlatform()); const params = parseQs(windowLocation); - matrixChat = ReactDOM.render( - tokenLoginCompleteDefer.resolve()} - initialScreenAfterLogin={getScreenFromLocation(windowLocation)} - makeRegistrationUrl={() => {throw new Error('Not implemented');}} - />, parentDiv, - ); + + tokenLoginCompletePromise = new Promise(resolve => { + matrixChat = ReactDOM.render( + {throw new Error('Not implemented');}} + />, parentDiv, + ); + }); } // set an expectation that we will get a call to /sync, then flush