test(docs-infra): fix test for preview server's BuildCleaner completing prematurely (#25671)

PR Close #25671
This commit is contained in:
George Kalpakas 2018-08-27 16:45:26 +03:00 committed by Kara Erickson
parent fe92614c91
commit 6c8863aa09

View File

@ -88,9 +88,12 @@ describe('BuildCleaner', () => {
}); });
it('should return a promise', () => { it('should return a promise', async () => {
const promise = cleaner.cleanUp(); const promise = cleaner.cleanUp();
expect(promise).toEqual(jasmine.any(Promise)); expect(promise).toEqual(jasmine.any(Promise));
// Do not complete the test and release the spies synchronously, to avoid running the actual implementations.
await promise;
}); });