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: avoid returns in module body #29

Closed demurgos closed 5 years ago

demurgos commented 5 years ago

Why

return statements in module body are only supported in Node because its module are in fact FunctionBody nodes. These kinds of early returns are not supported in ESM. Avoiding them is an easy fix.

What

Refactor tests to call specific functions based on the role of the process, instead of using early returns in module body.

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.