kamiyo / multi-progress-bars

A multi progress bar library for CLI, with support for indefinite task spinners
MIT License
27 stars 4 forks source link

How can I test the progress bar? #26

Open BioPhoton opened 11 months ago

BioPhoton commented 11 months ago

I integrated the lib successfully and now I want to write unit tests for it.

Are there any examples on how to do it?

kamiyo commented 11 months ago

If you want to get the progress bar section of the buffer, you can use getBuffer(). I'd be happy to also return the console portion in addition to the progress section from that function. Then you can examine what's in the array and write tests.

On Tue, Oct 24, 2023, 04:29 Michael Hladky @.***> wrote:

I integrated the lib successfully and now I want to write unit tests for it.

Are there any examples on how to do it?

— Reply to this email directly, view it on GitHub https://github.com/kamiyo/multi-progress-bars/issues/26, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWCYT5U2K5JG4NOOBQ56EDYA6DAVAVCNFSM6AAAAAA6NMMJDKVHI2DSMVQWIX3LMV43ASLTON2WKOZRHE2TQOBWGAZDKOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>

BioPhoton commented 6 months ago

Is there a snippet in the docs explaining this?