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

Isolate 3rd party libraries used internally by Busted from test environments #654

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

alerque
Copy link
Member

@alerque alerque commented Dec 2, 2020

Fixes #643

Before anything else, this fixes what seems to be an unrelated bug in the loaded table state isolation. The current package loaded state table save/restore functions were only working in one direction. The packages in the current package.loaded are restored to the state they were in at the save point, but anything that was in the save point but is no longer in the current package list (i.e. in the event of unloading a package, switching to a different version of the same package, or switching to a different isolation environment) would be left in because the keys from the save point are not iterated, only the keys from the current state.

After that, this (currently) takes the approach described in my comment here, only isolating 3rd party libraries loaded by Busted for it's own use, not Busted itself.

@alerque alerque marked this pull request as ready for review August 25, 2022 10:14
@alerque alerque requested a review from Tieske August 25, 2022 10:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Busted's test isolation leaks previously loaded modules into test scope
1 participant