Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an assert_not_error function #24

Open
xordspar0 opened this issue Sep 5, 2019 · 0 comments
Open

Add an assert_not_error function #24

xordspar0 opened this issue Sep 5, 2019 · 0 comments

Comments

@xordspar0
Copy link

Currently if I want to test that a function runs normally and doesn't return an error, I just run the function and don't try to catch the error.

function t.test_no_errors()
  might_error()
end

This is fine because lunatest runs all test cases inside pcall. However, if my function does return an error, lunatest reports the test case as having an error rather than a failed assertion. I would like to be able to consider this case as a failure, not a general error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant