JPeer264 / node-semantic-git-commit-cli

A CLI for semantic git commits
https://www.npmjs.com/package/semantic-git-commit-cli
MIT License
147 stars 11 forks source link

Add tests #5

Closed JPeer264 closed 7 years ago

JPeer264 commented 7 years ago

@dani-sc @rudolfsonjunior

we need more tests, especially for lib/sgcPrompt.js. Anybody experience in testing inquirer prompts?

dani-sc commented 7 years ago

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.

aichbauer commented 7 years ago

9