Open S-S-X opened 2 years ago
This might not be that good idea after all, sure it would allow testing internal API / functions / variables but is harder to keep track of, might be confusing (when tests fail even while API is completely fine) and possibly encourages worse tests and worse API design.
Also I'm not sure if there's any legitimate uses for this feature.
This should allow retrieving local variables and functions for validation and unit tests.
For example could be
mineunit:get_local("init.lua", "secretdata")
to getlocal secretdata = "internal stuff"
defined in modinit.lua
.Internal functions could be tested with
When mod
init.lua
contains