box / boxcli

A command line interface for interacting with the Box API.
https://developer.box.com
Apache License 2.0
228 stars 59 forks source link

test: fix unit tests with progress bar #389

Closed mwwoda closed 2 years ago

mwwoda commented 2 years ago

cli-progress library has two modes for printing progress bar. One for normal, interactive mode (TTY) and one for pipe, non-interactive mode (noTTY). For pipe mode, the progress bar is not printed at all (we could change this, but I think it makes more sense as it is currently implemented). It turns out that GH actions run in noTTY mode, and developers usually run tests in TTY mode using npm test in the terminal.

Now the tests will check the progress bar only in TTY mode.