want things simpler

This commit is contained in:
Michael Freno
2025-12-12 19:15:27 -05:00
parent b714b6204c
commit 1d6ad6018f
10 changed files with 139 additions and 824 deletions

View File

@@ -54,12 +54,9 @@ end
function TestModuleLoader:test_safeRequire_throws_error_for_missing_required_module()
-- Test loading a non-existent required module should throw error
lu.assertErrorMsgContains(
"Required module",
function()
ModuleLoader.safeRequire(modulePath .. "modules.NonExistentModule", false)
end
)
lu.assertErrorMsgContains("Required module", function()
ModuleLoader.safeRequire(modulePath .. "modules.NonExistentModule", false)
end)
end
function TestModuleLoader:test_stub_has_safe_init_method()
@@ -116,7 +113,7 @@ function TestModuleLoader:test_stub_returns_function_for_unknown_properties()
-- Unknown properties should return no-op functions for safe method calls
lu.assertIsFunction(stub.unknownProperty)
lu.assertIsFunction(stub.anotherUnknownProperty)
-- Calling unknown methods should not error
stub:unknownMethod()
stub:anotherUnknownMethod("arg1", "arg2")
@@ -197,5 +194,3 @@ end
if not _G.RUNNING_ALL_TESTS then
os.exit(lu.LuaUnit.run())
end
return TestModuleLoader