-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add tests and small syntactic improvements #2
base: latest
Are you sure you want to change the base?
Conversation
@@ -13,6 +13,7 @@ function _inflight (unique, doFly) { | |||
return resolve(doFly()) | |||
})) | |||
active[unique].then(cleanup, cleanup) | |||
function cleanup() { delete active[unique] } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The other copy of cleanup()
should also be removed, but really I'd prefer that you just remove this commit and 1eb2b41
@@ -1,21 +1,14 @@ | |||
'use strict' | |||
module.exports = inflight | |||
|
|||
let Bluebird |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why remove this? Why not let people use bluebird if they have bluebird? Bluebird is more than a ponyfill, it also adds additional really handy APIs. Also it's often faster than native Promises.
@@ -25,10 +25,10 @@ req('foo').then(…) | |||
req('foo').then(…) | |||
``` | |||
|
|||
## SEE ALSO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the tests, but as a rule I use tap
for my tests, not jest
. Ordinarily I'm not that picky, but as I'll have to maintain this going forward, I would like to see them in tap format before landing.
Edit: The commits are atomic and can be clicked to verify the changes in each step.
package-lock.json
to comply with modern NPMPromise
s are available in Node versions that are officially supportedNo functionality has changed, except removing reference to the undocumented feature of using
bluebird
(which wasn't even onpackage.json
).