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

test: refactor test utils and setup #8135

Merged
merged 4 commits into from
May 12, 2022
Merged

test: refactor test utils and setup #8135

merged 4 commits into from
May 12, 2022

Conversation

antfu
Copy link
Member

@antfu antfu commented May 12, 2022

This is more like a DX thing.

Currently, we shallow the beforeAll setup error deferring to afterAll to throw. It's for the tsconfig to test the expected failure. However, this allows the test to run with a broken state, which leads to a lot of misleading errors until the real error gets displayed in afterAll. This PR make the error throw on eager, only do the error tolerance in the tsconfig test.

@antfu antfu changed the title test: avoid relying on global beforeAllError test: refactor test utils and setup May 12, 2022
@antfu antfu merged commit da6dc9d into main May 12, 2022
@antfu antfu deleted the test/improve-setup branch May 12, 2022 05:12
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

Successfully merging this pull request may close these issues.

1 participant