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 897261efdc
commit b31c8b6063
1 changed files with 4 additions and 1 deletions

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;
}); });