Skip to content
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

Merged
merged 9 commits into from Apr 21, 2017
Merged

Extract functions #22

merged 9 commits into from Apr 21, 2017

Conversation

jackboberg
Copy link
Owner

  • make lib functions more pure, and keep flow logic in index
  • replace sinon and lab with testdouble and tap
  • now requires 100% coverage

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))
Copy link
Collaborator

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?

Copy link
Owner Author

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
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6a647eb on extract-functions into ** on master**.

@jackboberg jackboberg merged commit 53069c6 into master Apr 21, 2017
@jackboberg jackboberg deleted the extract-functions branch April 21, 2017 03:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants