Skip to content

Commit c00b4bf

Browse files
author
Tailung42
committed
test: write updated test for console.py
1 parent 097541c commit c00b4bf

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/commitlint/console.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@
33
44
NOTE: If any future changes are made to the output implementation,
55
they will be done from here.
6-
7-
86
"""
97

108
import sys

tests/test_console.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
def test_success(mock_stdout: MagicMock, _mock_config: MagicMock):
1212
message = "Success message"
1313
console.success(message)
14-
mock_stdout.write.assert_called_once_with(f"{message}\n")
14+
mock_stdout.write.assert_called_once_with(f"{console.green(message)}\n")
1515

1616

1717
@patch("commitlint.console.config", quiet=True)
@@ -27,7 +27,7 @@ def test_success_for_quiet(mock_stdout: MagicMock, _mock_config: MagicMock):
2727
def test_error(mock_stderr: MagicMock, _mock_config: MagicMock):
2828
message = "Error message"
2929
console.error(message)
30-
mock_stderr.write.assert_called_once_with(f"{message}\n")
30+
mock_stderr.write.assert_called_once_with(f"{console.red(message)}\n")
3131

3232

3333
@patch("commitlint.console.config", quiet=True)

0 commit comments

Comments
 (0)