-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(highlight): allow disabling syntax highlighting of caller code (#8)
This change allows users to use the `JUSTEST_DISABLE_SOURCE_HIGHLIGHT` environment variable to disable or enable the source code syntax highlighting when showing it in failure stack traces. Syntax highlighting remains enabled by default, but disabling it can be useful for some testing environments without support for rendering colors. The environment variable can be set to the following values: - "true", "TRUE", "True", "T", "t", "1" - "false", "FALSE", "False", "F", "f", "0"
- Loading branch information
Showing
2 changed files
with
25 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package justest_test | ||
|
||
import "os" | ||
|
||
func init() { | ||
_ = os.Setenv("JUSTEST_DISABLE_SOURCE_HIGHLIGHT", "false") | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters