CFC-Servers / CFC-Servers/GLuaTest

Hooks added as a side effect of a called function don't get cleaned up

Open
#34 0 comments 0 reactions 0 assignees View on GitHub
enhancement good first issue help wanted question
Dominant language
Lua
Stars
87
Forks
14
PR merge metrics
No merged PRs in 30d

Description

The test environment we create keeps track of hooks added with `hook.Add` and automatically cleans them up after the test completes.

However, if you call a function that calls `hook.Add`, they will not be tracked.

Is there a clever way of using `setfenv` (perhaps on a thread instead of a function?) that will let us accomplish this? Or should we just accept the fact that you need to clean up any hooks you indirectly create in your tests?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.