Ghost/ghost/promise/test/sequence.test.js
Daniel Lockyer 8c8fad3403 Updated tests filenames and fixed local requires
- fixed local requires to point to this new package
2020-08-11 18:28:51 +01:00

29 lines
748 B
JavaScript

require('./utils');
const sinon = require('sinon');
const Promise = require('bluebird');
const {sequence} = require('../');
describe('Unit: lib/promise/sequence', function () {
afterEach(function () {
sinon.restore();
});
it('mixed tasks: promise and none promise', function () {
const tasks = [
function a() {
return Promise.resolve('hello');
},
function b() {
return 'from';
},
function c() {
return Promise.resolve('chio');
}
];
return sequence(tasks)
.then(function (result) {
result.should.eql(['hello','from', 'chio']);
});
});
});