Skip to content

Commit

Permalink
Require Node.js 6
Browse files Browse the repository at this point in the history
  • Loading branch information
sindresorhus committed May 21, 2018
1 parent 0f40037 commit d573a97
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 15 deletions.
3 changes: 1 addition & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
* text=auto
*.js text eol=lf
* text=auto eol=lf
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
language: node_js
node_js:
- '10'
- '8'
- '6'
- '4'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
}
],
"engines": {
"node": ">=4"
"node": ">=6"
},
"scripts": {
"test": "xo && ava",
Expand Down
22 changes: 11 additions & 11 deletions test.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,22 +242,22 @@ test('should resolve empty when size is zero', async t => {

// It should take 1 seconds to resolve all tasks
for (let index = 0; index < 100; index++) {
queue.add(() => delay(10));
queue.add(() => delay(10));
}

queue.onEmpty().then(() => {
t.is(queue.size, 0);
});
queue.onEmpty().then(() => {
t.is(queue.size, 0);
});

queue.start();
queue.start();

// Pause at 0.5 second
setTimeout(async () => {
queue.pause();
await delay(10);
queue.start();
}, 500);
setTimeout(async () => {
queue.pause();
await delay(10);
queue.start();
}, 500);

await queue.onIdle();
await queue.onIdle();
});

0 comments on commit d573a97

Please sign in to comment.