-
-
Notifications
You must be signed in to change notification settings - Fork 306
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 exited without ending #459
Comments
Yeah, it seems tape('example', t => {
t.test('nested', tt => {
tt.end()
})
t.end()
}) |
An explicit |
@ljharb even thought this is technically a bug fix, it seems that many people rely on this broken behavior. As someone maintaining several repositories that now have tests failing due to this change, I'd like to request reverting the bugfix in the 4.x line, and releasing a 5.x with the bug fixed. That will allow everyone using semver to upgrade on their own schedule |
As someone working on a project with literally thousands of nested tests like this, I agree--a major release fix would be nice here... |
Yeah, this is a fair point. Do you think that it would be a reasonable patch release to explicitly allow a test that only has nested tests to not require the outer end/plan? iow, the requirement would present itself the instant you had a top-level non-nested-test assertion. My hope is that that way we wouldn't have to jump to v5, we'd keep the bugfix in v4.10, and we'd remove the friction you are experiencing. |
That would work for our codebase as far as I know, and it sounds like a good middle ground. Personally I would prefer keeping things simple with a revert to unblock progress (Greenkeeper is already getting confused about other package updates since our tests are failing). That said, I appreciate the time it will take to fix this either way, so I'd be fine with either. Thanks for taking a look at it :) |
@orangejulius if I can't fix it in the next day or so, I'll plan to revert, but I always prefer rolling forward than rolling back, since you can pin to |
I believe we do not mix nested tests with other assertions, so that seems like a reasonable approach to me. I can't really speak for what the expectations are for the rest of the community though. |
+1 on the 'test that has only nested tests and no other assertions'. Would fix our library with literally 1 million tests written like this. |
Ended up reverting; I'll reopen #222. Hopefully v4.10.1 fixes this. |
4.10.1 works great for us. Thanks for taking the time to handle this! |
All nested tests now exit without ending.
Tape version: ^4.9.1 (latest)
This code will fail to run.
The text was updated successfully, but these errors were encountered: