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

Failing tests show as passing (Error Boundaries; 09.01 & 09.02) #399

Closed
ianjmacintosh opened this issue Oct 15, 2024 · 3 comments
Closed

Comments

@ianjmacintosh
Copy link
Contributor

I ran the tests for the "Error Boundaries: Other Errors" lesson (/exercises/09.errors/02.solution.show-boundary/error-boundary.test.ts) and saw the tests show as passing even before I started the exercise, but the console shows that the assertions are not being satisfied.

I went back to the previous chapter (09.01) and see the same thing happening in /exercises/09.errors/01.solution.composition/error-boundary.test.ts so I started troubleshooting there.

test.ts:35 Uncaught (in promise) Error: Error boundary is rendered immediately due to render error

It seems like something in testStep isn't behaving right. I did a little bit of digging in https://github.com/epicweb-dev/epicshop/blob/main/packages/workshop-utils/src/test.ts but I got lost real fast.

Workshop app shows tests passing, console shows tests failing
@kentcdodds
Copy link
Member

Thanks for bringing this up! I forgot to await the test step.

@ianjmacintosh
Copy link
Contributor Author

Thanks for bringing this up! I forgot to await the test step.

Thank you! And now that you've shown me the fix, I'm going to apply the same for /exercises/09.errors/02.solution.show-boundary/error-boundary.test.ts brb

@ianjmacintosh
Copy link
Contributor Author

nm, you beat me to it in 1480382

Thanks again 🙌

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