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

The test runner should output the full error details if encountering errors inside a setup (or teardown) function #481

Open
Duckwhale opened this issue Feb 8, 2024 · 0 comments

Comments

@Duckwhale
Copy link
Member

Duckwhale commented Feb 8, 2024

When the test runner encounters an error, the details (stack trace, message, script name) are saved and displayed as part of the report string once all test files have been executed. However, if a setup or teardown function encounters the error, only the message itself will be displayed.

This is because of the early exit here. Since the error details are available, they should be output to ease troubleshooting.

Example:

before(function()
	error("You'll see me, but not the error details! :3", 0)
end)

In this case, the test runner should likely count this as an error in the test suite (test file) and make the current section fail.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: The time is nigh (Planning)
Development

No branches or pull requests

1 participant