summaryrefslogtreecommitdiff
path: root/test/auto.js
diff options
context:
space:
mode:
authorJimmy Wärting <jimmy@warting.se>2021-12-02 19:30:07 +0100
committerGitHub <noreply@github.com>2021-12-02 10:30:07 -0800
commit2ee673f5af40bdbbec4ce21d81147e946b75d55a (patch)
treea27f43bc11a3046e8e5fbcfa8a0302a8c857a312 /test/auto.js
parentcdfb4917e6028c8f966276d6e792018c7fd2ae3c (diff)
downloadasync-2ee673f5af40bdbbec4ce21d81147e946b75d55a.tar.gz
Housekeeping (#1772)
* rimraf was not being used * one less use of lodash dep * shorter name variant * one less lodash fn being used * use native forEach * result was a object * one less lodash recommendation * more explicit path * removed a unused variable
Diffstat (limited to 'test/auto.js')
-rw-r--r--test/auto.js12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/auto.js b/test/auto.js
index 3dc364d..938b040 100644
--- a/test/auto.js
+++ b/test/auto.js
@@ -1,4 +1,4 @@
-var async = require('../lib');
+var async = require('../lib/index.js');
var {expect} = require('chai');
var _ = require('lodash');
@@ -70,7 +70,7 @@ describe('auto', () => {
task5: ['task2', makeCallback('task5')],
task6: ['task2', makeCallback('task6')]
}, concurrency, (err, results) => {
- _.each(results, (result) => {
+ Object.values(results).forEach((result) => {
expect(result.length).to.be.below(concurrency + 1);
});
done();
@@ -457,7 +457,7 @@ describe('auto', () => {
next('Something bad happened here');
},
'filter' (next) {
- _.delay(() => {
+ setTimeout(() => {
next(null, 'All fine here though');
}, 25);
},
@@ -466,7 +466,7 @@ describe('auto', () => {
}]
}, (err) => {
expect(err).to.equal('Something bad happened here');
- _.delay(done, 30);
+ setTimeout(done, 30);
});
});
@@ -476,7 +476,7 @@ describe('auto', () => {
next('Something bad happened here');
},
'hasOwnProperty' (next) {
- _.delay(() => {
+ setTimeout(() => {
next(null, 'All fine here though');
}, 25);
},
@@ -485,7 +485,7 @@ describe('auto', () => {
}]
}, (err) => {
expect(err).to.equal('Something bad happened here');
- _.delay(done, 30);
+ setTimeout(done, 30);
});
});