dojo / cli

:rocket: Dojo - command line tooling.
http://dojo.io
Other
25 stars 34 forks source link

Make logging consistent and improve testability by centralising it #242

Closed JamesLMilner closed 6 years ago

JamesLMilner commented 6 years ago

Enhancement

Currently the code uses chalk for colouring and logging. For testing purposes and cleaner code, it would be beneficial to have logging and colouring centralized into it's own module to make testing easier and code more consistent.

At the moment we stub the console object directly in tests which I think is a bit flakey as if there is any logging in the CLI tests this could cause hard to track down errors (i.e. callCount will include logs in tests for example).

JamesLMilner commented 6 years ago

Realized this is already covered by this issue: https://github.com/dojo/cli/issues/140