Permalink
Browse files

Update the simpleCase example to the new API.

  • Loading branch information...
1 parent aec34cb commit dbf77846fdfd5814148a868d8fb58a8b94ea3b96 @creationix committed Apr 5, 2010
Showing with 10 additions and 7 deletions.
  1. +10 −7 test/test.js
View
@@ -70,21 +70,24 @@ processFileSync("I don't exist", outputHandler("processFileSync-ERROR"));
var simpleCase = Conduct({
A: [function(callback) {
process.nextTick(function () {
- callback("a1", "a2");
+ callback(undefined, "a1", "a2");
});
}],
- B: ["A1", function (input, callback) {
+ B: ["A2", function (input, callback) {
process.nextTick(function () {
- callback(input + "modified");
+ callback(undefined, input + "modified");
});
}],
- C: ["A0","B0", function (input1, input2, callback) {
- sys.p({
+ C: ["A1","B1", function (input1, input2, callback) {
+ return {
input1: input1,
input2: input2
- });
+ };
}]
-});
+}, "C1");
+
+
+simpleCase(outputHandler("simpleCase"));
// // Same example but without using Conductor.
// // Note the level of error handling done automatically by Conductor.

0 comments on commit dbf7784

Please sign in to comment.