cli-table / cli-table3

Pretty unicode tables for the command line
MIT License
527 stars 44 forks source link

#196 - Fix to failing unit tests #283

Closed speedytwenty closed 2 years ago

speedytwenty commented 2 years ago

This mocks the colors module within the "legacy tests" to produce consistent output from colors—as the tests expect.

This one-liner appropriately resolves #196.

speedytwenty commented 2 years ago

To emphasize, this failing test is not detected by CI (Travis nor Github Actions) but only by developers.

To verify this fix requires testing both the failing test and the passing test manually:

➭ git clone https://github.com/speedytwenty/cli-table3.git
➭ cd cli-table3
➭ yarn install --frozen-lockfile
➭ yarn test
➭ git checkout issue-196b
➭ yarn test

Use ➭ git checkout v0.6.0 to see the tests fail if testing after the fix hits master.