fix(tests): expectations of some async test where not working (#989)

This commit is contained in:
Christian C. Salvadó
2019-06-25 23:35:24 -06:00
committed by Angelos Chalaris
parent c89fd04ced
commit f4df77d62f
7 changed files with 20 additions and 19 deletions

View File

@ -5,5 +5,7 @@ test('runPromisesInSeries is a Function', () => {
});
const delay = d => new Promise(r => setTimeout(r, d));
test('Runs promises in series', () => {
runPromisesInSeries([() => delay(100), () => delay(200).then(() => expect(true).toBeTruthy())]);
return runPromisesInSeries([() => delay(100), () => delay(200)]).then(() =>
expect(true).toBeTruthy()
);
});