fix(tests): disable colors for tree output tests

This commit is contained in:
Orhun Parmaksız 2021-12-17 13:32:18 +03:00
parent 1f71a6d085
commit 3f0286fb59
No known key found for this signature in database
GPG key ID: F83424824B3E4B90

View file

@ -129,6 +129,7 @@ impl Tree {
#[cfg(test)]
mod tests {
use super::*;
use std::env;
fn test_single_tree_creation(lines: &[&str], seperator: char, expected_tree: TreeNode) {
let tree = Tree::from_input(&mut lines.iter(), seperator);
@ -219,6 +220,7 @@ mod tests {
#[test]
fn test_print_line() {
let value = String::from("abc\ndef");
env::set_var("NO_COLOR", "1");
let mut output = Vec::new();
TreeNode {