Closed kopach closed 7 months ago
@ValentinH , please review
Some tests are failing, but could be an issue with tests, not sure. Please, check and feel free to update this PR as you need
The tests are pretty trustworthy. It seems that only the cases that check the actual behavior of tests failed by failOnConsole are failing. Maybe the original chalk has a different behavior when used in tests/Jest?
as those test cases meant to fail, I guess, toThrow
https://jestjs.io/docs/expect#tothrowerror should be used instead. what do you think?
Unfortunately this isn't that easy. These tests are actually using Jest to test a Jest plugin. That's why we are using this "fixture" pattern.
Unfortunately this isn't that easy. These tests are actually using Jest to test a Jest plugin. That's why we are using this "fixture" pattern.
ok, found issue, will try to debug
Thanks for this contribution. It was released as https://github.com/ValentinH/jest-fail-on-console/releases/tag/v3.1.2
fixes: #43
Some docs: https://stackoverflow.com/questions/4842424/list-of-ansi-color-escape-sequences
Tested on Linux & Mac Haven't tested on Windows
Simple test