-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Failing unit test #196
Comments
Spent some time debugging this and I was able to trace it to a difference in versions of the "colors" module between cli-table and cli-table3. It's a bit tricky to debug for a couple reasons:
If you run:
When I run: So it's clear that colors is likely producing two different outputs based on the versions, but the actual difference is invisible. This failing test does not indicate a functional bug with cli-table3 (nor cli-table). I'm not exactly sure the best route to go about resolving this to get the tests passing again. I tend to avoid modifying tests as much as possible, but it might make sense to mock colors and test that it was called as expected rather than comparing the output. Alternatively, it might make sense to remove the tests against cli-table altogether as it is testing external code which cli-table sufficiently covers in it's tests. |
After a closer look, considering the CI builds are passing. I discovered that the tests pass when ran with the "--runInBand" flag. I think this must result in the later version of colors being used throughout the test but I can't tell for sure. Try |
The failing tests are caused by differences in output produced by the (obscure) "colors" module(s). Yet somehow, they didn't fail before with Travis, nor now with Github Actions. But if you download master, before this is resolved, and run To be clear, this existed before cli-table3 moved to I attempted a solution for this in #196 and realized it was inadequate—despite preventing the failing errors—the The appropriate solution will be to mock the color module(s) within the tests implicated. But from there, the question becomes which version(s) of cli-table is cli-table3 attempting to support? |
I tried to clone the project and run test in my local. But I got several tests are failing.
Im using MacOs with zsh command line
The text was updated successfully, but these errors were encountered: