Files
30-seconds-of-code/test/chainAsync.test.js
2018-10-19 20:18:00 +03:00

23 lines
396 B
JavaScript

const expect = require('expect');
const {chainAsync} = require('./_30s.js');
test('chainAsync is a Function', () => {
expect(chainAsync).toBeInstanceOf(Function);
});
test('Calls all functions in an array', () => {
chainAsync([
next => {
next();
},
next => {
(() => {
next();
})();
},
next => {
expect(true).toBeTruthy();
}
]);
});