opensource-nepal / commitlint

commitlint is a tool designed to lint your commit messages according to the Conventional Commits standard for your pre-commit hook and GitHub Actions.
GNU General Public License v3.0
16 stars 9 forks source link

test: refactor tests for system exit #40

Closed aj3sh closed 4 months ago

aj3sh commented 4 months ago

Description

In our tests, we are currently mocking sys.exit. Due to this mocking, the application logic does not exit immediately in the tests, resulting in many errors failing. Therefore, this issue is being addressed through this PR by removing the mock and checking for the SystemExit exception to be raised.

Related Issue

N/A

Type of Change

Please mark the appropriate option below to describe the type of change your pull request introduces:

Checklist

Additional Notes

[Add any additional notes or context that you think the reviewers should know about.]

By submitting this pull request, I confirm that I have read and complied with the contribution guidelines of this project.