Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Prior to this commit, the library and its tests relied on the same code to add color to terminal output. This prevented the tests from recognizing changes to that code. Such a change was introduced in a recent release of the `chalk` module [1]: it was updated to disable text coloring when run without a TTY. This is the case in the test environment environment provided by the `tap` module (which AVA uses for its tests). This fix disabled color output in the tests, but it caused no failures because both the expected values and the actual values were effected. However, this situation amounted to a decrease in test coverage because the expected color of the terminal output could no longer be verified. Update the tests environment to simulate a TTY so that AVA continues to produce colored text despite being run in a sub-process provided by `tap`. Update the test logic to reduce dependency on Ava internals in order to avoid similar silent regressions in the future. [1] chalk/chalk@0827d3b
- Loading branch information