Skip to content

Commit 0cf4c97

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

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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)