Remove test delays (#5579)

* Changing __indexBuildCompletionCallbackForTests callback to serverStartComplete

* Improving serverStartComplete callback to avoid production unhandled promise rejection

* Add test to check inexistence of unhandled promise rejection on server fail

* Removing some hooks delays

* Removing delay after reconfigureServer

* Improving code style
This commit is contained in:
Antonio Davi Macedo Coelho de Castro
2019-05-14 11:34:51 -07:00
committed by GitHub
parent 2f161c25cd
commit 893f1d376e
11 changed files with 145 additions and 108 deletions

View File

@@ -46,7 +46,6 @@ describe('FilesController', () => {
const logController = new LoggerController(new WinstonLoggerAdapter());
reconfigureServer({ filesAdapter: mockAdapter })
.then(() => new Promise(resolve => setTimeout(resolve, 1000)))
.then(() => new Parse.File('yolo.txt', [1, 2, 3], 'text/plain').save())
.then(
() => done.fail('should not succeed'),