tapjs / foreground-child

Run a child as if it's the foreground process. Give it stdio. Exit when it exits.
http://tapjs.github.io/foreground-child/
ISC License
39 stars 14 forks source link

refactor: foregroundChild arguments normalization #25

Closed demurgos closed 5 years ago

demurgos commented 5 years ago

Why

foregroundChild has a complex signature. Using a dedicated function for arguments normalization would improve clarity.

What

Document the signature of foregroundChild, move arguments normalization to a separate function, small simplification to the normalization.

demurgos commented 5 years ago

The CI failure seems to be an Appveyor issue (issue in their npm package). Fixed in https://github.com/tapjs/foreground-child/pull/24.

demurgos commented 5 years ago

This also fixes a bug: https://github.com/tapjs/foreground-child/pull/30#issuecomment-422700978

bcoe commented 5 years ago

@demurgos this seems reasonable to me, do we have tests already for each function signature?

demurgos commented 5 years ago

@bcoe See #30