Add tests
JPeer264 opened this issue · comments
@dani-sc @rudolfsonjunior
we need more tests, especially for lib/sgcPrompt.js
. Anybody experience in testing inquirer
prompts?
What I've found so far:
Blog: Unit Testing CLI Programs, however the npm package used (bdd-stdin) is (a) buggy and (b) would require quite a bit of refactoring in our code.
Something like rewire/sinon/... is also not of use, as we can't rewire process.stdin to simulate input afaik.
Last but not least, there is an open issue concerning improved unit testing capabilities, but nobody is working on that yet.