UNPKG

flowa

Version:

Service level control flow for Node.js

92 lines (79 loc) 1.42 kB
/** * Just one task * * @author Mohammad Fares <faressoft.com@gmail.com> */ /** * Hints for the testing suites * @type {Object} */ module.exports.hints = {}; /** * Flowa options * @type {Object} */ module.exports.hints.options = { autoInjectResults: false }; /** * A mapping between tasks names and runners types * @type {Object} */ module.exports.hints.tasksRunnersTypes = { '__root__': 'serial', task1: 'serial' }; /** * A mapping between tasks names and their depth * @type {Object} */ module.exports.hints.tasksDepths = { '__root__': 0, task1: 1 }; /** * A mapping between tasks names and their parent task's name * @type {Object} */ module.exports.hints.tasksParents = { '__root__': null, task1: '__root__' }; /** * The context * @type {Object} */ module.exports.hints.context = { _task1: 1 }; /** * The state of the context object in each event loop tick * @type {Array} */ module.exports.hints.timeline = [ {}, {_task1: 1} ]; /** * The debug logs for each executed task * ordered as per the execution order * @type {Array} */ module.exports.hints.debugLogs = [ 'task1' ]; /** * The flow sample * @type {Object} */ module.exports.flow = { task1: generators.generateDummyTask(1) }; /** * Tasks indexed by their names * @type {Object} */ module.exports.hints.tasks = { '__root__': module.exports.flow, task1: module.exports.flow.task1 };