summaryrefslogtreecommitdiff
path: root/test/test-async.js
diff options
context:
space:
mode:
Diffstat (limited to 'test/test-async.js')
-rwxr-xr-xtest/test-async.js92
1 files changed, 0 insertions, 92 deletions
diff --git a/test/test-async.js b/test/test-async.js
index b77ba78..b310f70 100755
--- a/test/test-async.js
+++ b/test/test-async.js
@@ -78,98 +78,6 @@ function isBrowser() {
(process + "" !== "[object process]"); // browserify
}
-exports['applyEach'] = function (test) {
- test.expect(5);
- var call_order = [];
- var one = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('one');
- cb(null, 1);
- }, 100);
- };
- var two = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('two');
- cb(null, 2);
- }, 50);
- };
- var three = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('three');
- cb(null, 3);
- }, 150);
- };
- async.applyEach([one, two, three], 5, function (err) {
- test.ok(err === null, err + " passed instead of 'null'");
- test.same(call_order, ['two', 'one', 'three']);
- test.done();
- });
-};
-
-exports['applyEachSeries'] = function (test) {
- test.expect(5);
- var call_order = [];
- var one = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('one');
- cb(null, 1);
- }, 100);
- };
- var two = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('two');
- cb(null, 2);
- }, 50);
- };
- var three = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('three');
- cb(null, 3);
- }, 150);
- };
- async.applyEachSeries([one, two, three], 5, function (err) {
- test.ok(err === null, err + " passed instead of 'null'");
- test.same(call_order, ['one', 'two', 'three']);
- test.done();
- });
-};
-
-exports['applyEach partial application'] = function (test) {
- test.expect(4);
- var call_order = [];
- var one = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('one');
- cb(null, 1);
- }, 100);
- };
- var two = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('two');
- cb(null, 2);
- }, 50);
- };
- var three = function (val, cb) {
- test.equal(val, 5);
- setTimeout(function () {
- call_order.push('three');
- cb(null, 3);
- }, 150);
- };
- async.applyEach([one, two, three])(5, function (err) {
- if (err) throw err;
- test.same(call_order, ['two', 'one', 'three']);
- test.done();
- });
-};
exports['seq'] = function (test) {
test.expect(5);