Skip to content

Commit 245e394

Browse files
committed
refactor: console_results_test
1 parent a0b82c5 commit 245e394

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/unit/console_results_test.sh

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -525,11 +525,12 @@ function test_no_tests_found() {
525525
function test_print_successful_test_output_no_args() {
526526
original_simple_output=$BASHUNIT_SIMPLE_OUTPUT
527527
export BASHUNIT_SIMPLE_OUTPUT=false
528+
export TERMINAL_WIDTH=120
528529

529530
local test_name="a custom test"
530531

531532
assert_matches \
532-
"✓ Passed.*$test_name.*(12 ms)" \
533+
"✓ Passed.*$test_name.*12 ms" \
533534
"$(console_results::print_successful_test "$test_name" "12")"
534535

535536
export BASHUNIT_SIMPLE_OUTPUT=$original_simple_output
@@ -538,12 +539,13 @@ function test_print_successful_test_output_no_args() {
538539
function test_print_successful_test_output_with_args() {
539540
local original_simple_output=$BASHUNIT_SIMPLE_OUTPUT
540541
export BASHUNIT_SIMPLE_OUTPUT=false
542+
export TERMINAL_WIDTH=120
541543

542544
local test_name="a custom test"
543545
local data="foo"
544546

545547
assert_matches \
546-
"✓ Passed.*$test_name \($data\).*(12 ms)" \
548+
"✓ Passed.*$test_name \($data\).*12 ms" \
547549
"$(console_results::print_successful_test "$test_name" "12" "$data")"
548550

549551
export BASHUNIT_SIMPLE_OUTPUT=$original_simple_output

0 commit comments

Comments
 (0)