-
Notifications
You must be signed in to change notification settings - Fork 3
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
is after-all
running at the correct time ?
#7
Comments
Well spotted. I had a feeling this would come up. The answer is that they are indeed run at the correct time. The problem is the output. The output is normally captured within an explicit context of a test. That context value is important given the concurrent running of the tests. However, before/after all are run only once for a suite (not every test as the output might imply), so they are not captured within a test context. Originally that output was thrown away but that seemed worse, so instead nutest now shows output that has no test context first, then the test output. It doesn't distinguish between before and after all, because that information is not available at the time the output is captured. It's something I plan to come back to. In the PLAN.md I've got this to remind me:
So basically the capture needs to be enriched to distinguish the two, then flow that into the database, then we can display it correctly. Not trivial, but no breaking changes for the user, so my plan is to come back to this post 1.0, which isn't too far away. (That was far too many words to describe the issue, but it was a good reminder to me what I need to do!) |
that's more than fair, thanks for the clarification 🙏 |
i wrote a more complete example test file below with a
before-all
andafter-all
but i get the following
The text was updated successfully, but these errors were encountered: