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,7 +5,7 @@ test('chainAsync is a Function', () => {
});
let incrementer = 0;
test('Calls all functions in an array', () => {
test('Calls all functions in an array', done => {
chainAsync([
next => {
incrementer += 1;
@ -17,17 +17,19 @@ test('Calls all functions in an array', () => {
},
next => {
expect(incrementer).toEqual(2);
done();
}
]);
});
test('Last function does not receive "next" argument', () => {
test('Last function does not receive "next" argument', done => {
chainAsync([
next => {
next();
},
next => {
expect(next).toBe(undefined);
done();
}
]);
});