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
Extract functions #22
Conversation
This version is more robust and easier to test, not yet implemented in main function. - added support for finding package.json files regardless of process.cwd() and supports nested directories - always yields an object to limit errors when using in unconventional setups - setup tap test suite to replace lab eventually
- uses .trim instead of a regex - add support for stderr
], (err, results) => { | ||
if (err) done(err) | ||
else done(null, Object.assign({}, ...results)) | ||
done(err, Object.assign({}, ...results)) |
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.
This is done to get all details regardless of errors right?
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.
Actually err
never exists, all the tasks
yield an {}
when things go wrong. So, mostly this is just a simpler way to avoid adding // eslint-disable-line handle-callback-error
and still get 100% coverage.
- removes lab and sinon devDependencies - rework test to focus on main flow - update scripts to use tap and require 100% coverage
22bc183
to
6a647eb
Compare
Changes Unknown when pulling 6a647eb on extract-functions into ** on master**. |
lib
functions more pure, and keep flow logic inindex
sinon
andlab
withtestdouble
andtap