fix(tests): expectations of some async test where not working (#989)
This commit is contained in:
committed by
Angelos Chalaris
parent
c89fd04ced
commit
f4df77d62f
@ -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();
|
||||
}
|
||||
]);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user