chore: upgrade ts2lua-unreal to v0.3.1 with lowercase lib/module.lua & lib/class.lua and commit framework refactor
This commit is contained in:
1 parent
783dccf53d
commit
3572f2da43
206 files changed
+14442
-13186
No files matched your search
@@ -11,7 +11,7 @@ const luaBin = ["lua5.4", "lua"].find((cmd) => {
|
||||
});
|
||||
|
||||
if (!luaBin) {
|
||||
console.error("[run-tests] Lua 5.4 interpreter (lua5.4 / lua) not found in PATH.");
|
||||
console.error("[run-unit-tests] Lua 5.4 interpreter (lua5.4 / lua) not found in PATH.");
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
@@ -25,11 +25,13 @@ const luaPath = [
|
||||
|
||||
const code = `
|
||||
package.path = ${JSON.stringify(luaPath)} .. ";" .. package.path
|
||||
require("Lib.Module")
|
||||
require("Lib.Class")
|
||||
__MODULE__.Import("Tests.Harness.MockUnLuaRuntime").InstallIfNeeded()
|
||||
_G.__TS2LUA_TEST_AUTO_RUN__ = true
|
||||
__MODULE__.Import("Tests.RunAllTests")
|
||||
require("lib.module")
|
||||
require("lib.class")
|
||||
local runner = __MODULE__.Import("tests.run_unit_tests")
|
||||
local summary = runner.RunAllUnitTests()
|
||||
if not summary or (summary.total or 0) <= 0 or (summary.failed or 0) > 0 then
|
||||
os.exit(1)
|
||||
end
|
||||
`;
|
||||
|
||||
const result = spawnSync(luaBin, ["-e", code], {
|
||||
Reference in new issue
Block a user