fix - dont directly compare elements
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
package.path = package.path .. ";./?.lua;./game/?.lua;./game/utils/?.lua;./game/components/?.lua;./game/systems/?.lua"
|
||||
package.path = package.path .. ";./?.lua;./modules/?.lua;./game/?.lua;./game/utils/?.lua;./game/components/?.lua;./game/systems/?.lua"
|
||||
|
||||
-- Set global flag BEFORE loading anything to prevent individual test files from modifying package.path
|
||||
_G.RUNNING_ALL_TESTS = true
|
||||
|
||||
-- Check for --no-coverage flag and filter it out
|
||||
local enableCoverage = true
|
||||
@@ -30,9 +33,6 @@ else
|
||||
print("========================================")
|
||||
end
|
||||
|
||||
-- Set global flag to prevent individual test files from running luaunit
|
||||
_G.RUNNING_ALL_TESTS = true
|
||||
|
||||
local luaunit = require("testing.luaunit")
|
||||
|
||||
local testFiles = {
|
||||
@@ -41,7 +41,7 @@ local testFiles = {
|
||||
"testing/__tests__/calc_test.lua",
|
||||
"testing/__tests__/critical_failures_test.lua",
|
||||
"testing/__tests__/element_test.lua",
|
||||
--"testing/__tests__/element_mode_override_test.lua",
|
||||
"testing/__tests__/element_mode_override_test.lua",
|
||||
"testing/__tests__/event_handler_test.lua",
|
||||
"testing/__tests__/flexlove_test.lua",
|
||||
"testing/__tests__/grid_test.lua",
|
||||
@@ -56,7 +56,7 @@ local testFiles = {
|
||||
"testing/__tests__/ninepatch_test.lua",
|
||||
"testing/__tests__/performance_test.lua",
|
||||
"testing/__tests__/renderer_test.lua",
|
||||
--"testing/__tests__/retained_in_immediate_test.lua",
|
||||
"testing/__tests__/retained_in_immediate_test.lua",
|
||||
"testing/__tests__/retained_prop_stability_test.lua",
|
||||
"testing/__tests__/roundedrect_test.lua",
|
||||
"testing/__tests__/scroll_manager_test.lua",
|
||||
@@ -68,13 +68,7 @@ local testFiles = {
|
||||
}
|
||||
|
||||
local success = true
|
||||
print("========================================")
|
||||
print("Running ALL tests")
|
||||
print("========================================")
|
||||
for i, testFile in ipairs(testFiles) do
|
||||
print("========================================")
|
||||
print("Running test file " .. i .. "/" .. #testFiles .. ": " .. testFile)
|
||||
print("========================================")
|
||||
local status, err = pcall(dofile, testFile)
|
||||
if not status then
|
||||
print("ERROR running test " .. testFile .. ": " .. tostring(err))
|
||||
@@ -84,10 +78,6 @@ for i, testFile in ipairs(testFiles) do
|
||||
end
|
||||
end
|
||||
|
||||
print("========================================")
|
||||
print("All tests completed")
|
||||
print("========================================")
|
||||
|
||||
local result = luaunit.LuaUnit.run()
|
||||
|
||||
-- Generate and display coverage report
|
||||
|
||||
Reference in New Issue
Block a user