Asyncronous Flow Control
npm install motorwayjavascript
Motorway = require('motorway')
motorway = new Motorway()
`
$3
Adds a junction identified by _name_ which runs after all the junctions in _runAfter_ finish
$3
Adds _function_ as an action for _junction_
Actions __must end with__ this.rejoin() so that motorway knows when to flag the action as complete.
$3
Load a junction from _modulePath_. Your junction file should look like this:
`javascript
module.exports = {
name: 'configure',
runAfter: ['init'],
actions: [
function(){
this.rejoin()
}
]
}
`
$3
Drops the junction _name_ so that it wont run.
$3
Creates a new junction call _newJUnctionName_ with the runAfter details from _oldJunctionName_. It then calls dropJunction for _oldJunctionName_
Useful for replacing the listen junction with a test` junction in your tests