boltpkg / bolt

⚡️ Super-powered JavaScript project management
MIT License
2.35k stars 82 forks source link

Refactor passing of flags to require less hacks #223

Open lukebatchelor opened 5 years ago

lukebatchelor commented 5 years ago

As a part of #214 we had to skip some tests that were technically never actually testing anything. To get them passing would require some pretty gross hacking of process.argv within tests that I'm not super comfortable leaving in.

I think the correct path forward is to refactor how we pass args to our scripts. Maybe as simple as passing an untyped raw copy of the args along with the typed ones as an escape hatch.

By passing it it, we wont require the hacks in #214 of using the process.argv and wont require any hacks to get the tests working (as we can pass whatever we need to in those mocked calls).