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).
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).