Skip to content

Commit

Permalink
Update the simpleCase example to the new API.
Browse files Browse the repository at this point in the history
  • Loading branch information
creationix committed Apr 5, 2010
1 parent aec34cb commit dbf7784
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions test/test.js
Expand Up @@ -70,21 +70,24 @@ processFileSync("I don't exist", outputHandler("processFileSync-ERROR"));
var simpleCase = Conduct({ var simpleCase = Conduct({
A: [function(callback) { A: [function(callback) {
process.nextTick(function () { process.nextTick(function () {
callback("a1", "a2"); callback(undefined, "a1", "a2");
}); });
}], }],
B: ["A1", function (input, callback) { B: ["A2", function (input, callback) {
process.nextTick(function () { process.nextTick(function () {
callback(input + "modified"); callback(undefined, input + "modified");
}); });
}], }],
C: ["A0","B0", function (input1, input2, callback) { C: ["A1","B1", function (input1, input2, callback) {
sys.p({ return {
input1: input1, input1: input1,
input2: input2 input2: input2
}); };
}] }]
}); }, "C1");


simpleCase(outputHandler("simpleCase"));


// // Same example but without using Conductor. // // Same example but without using Conductor.
// // Note the level of error handling done automatically by Conductor. // // Note the level of error handling done automatically by Conductor.
Expand Down

0 comments on commit dbf7784

Please sign in to comment.