bigtestjs / server

All BigTest development has moved to https://github.com/thefrontside/bigtest
https://github.com/thefrontside/bigtest
2 stars 1 forks source link

🐛Remove event handler in teardown hook #77

Closed cowboyd closed 4 years ago

cowboyd commented 4 years ago

In order versions of effection, the teardown hook was added by returning a function from the controller. The newest version however, requires explicitly invoking the ensure function in order to register the hook. We didn't update to the new method, and so our event handlers were never getting un-registered.

This wasn't effecting us because the resume() of a halted context is a no-op, but it was leaking the context itself which is not good.

jnicklas commented 4 years ago

Ahh, so that's why we were leaking event handlers!

cowboyd commented 4 years ago

Yes, and because we didn't update the TypeScript typings to reflect the API change, we got burnt.