Created
August 30, 2012 15:49
-
-
Save davglass/3531444 to your computer and use it in GitHub Desktop.
YUI Pull #233 - Better test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test_results_order: function () { | |
var stack = new Y.Parallel(), | |
test = this; | |
setTimeout(stack.add(function () { | |
return 1; | |
}), 100); | |
setTimeout(stack.add(function () { | |
return 2; | |
}), 10); | |
setTimeout(stack.add(function () { | |
return 3; | |
}), 50); | |
stack.done(function (results) { | |
test.resume(function() { | |
Y.ArrayAssert.itemsAreEqual(results, [1, 2, 3], 'Results array did not retain order of callbacks'); | |
}); | |
}); | |
test.wait(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment