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

Finally block silents errors causing false-positive 0 exit code #60

Open
matej21 opened this issue Nov 4, 2020 · 2 comments
Open

Finally block silents errors causing false-positive 0 exit code #60

matej21 opened this issue Nov 4, 2020 · 2 comments

Comments

@matej21
Copy link
Contributor

matej21 commented Nov 4, 2020

the finally block in runner function silents every error which is thrown outside the inner try block.

Example:

import { test } from 'uvu'
test.before(() => {
    throw Error()
})
test('foo', () => {

})
test.run()

although the console output correctly shows that 0 tests passed, the process exits with false-positive exit code 0 and prints no error

besides hooks, also internal errors may cause this, e.g. a function for error formatting fails, when a string is passed as an error (throw 'error string')

@jfranzoi-gucci
Copy link

Hi, I know this is an old issue, just wondering if that's going to be improved. Thanks.

@matej21
Copy link
Contributor Author

matej21 commented Aug 16, 2023

it seems this library is no longer maintained. I've switched to vitest long time ago.

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

2 participants