Fix actions not running in priority order (#107)
Some checks are pending
unit-test / unit-test (push) Waiting to run

Co-authored-by: centau <83140718+centau@users.noreply.github.com>
This commit is contained in:
Kaan 2026-10-22 15:12:21 +03:00 • committed by GitHub
parent dda5e0f2bb
commit d99dbe1873
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 4 deletions

View file

@ -2469,6 +2469,20 @@ TEST("actions", function()
CHECK(testkit.seq(queue, { 1, 2 }))
end
do CASE "non-consecutive priorities"
local queue = {}
create "Frame" {
action(function() table.insert(queue, 100) end, 100),
action(function() table.insert(queue, 2.5) end, 2.5),
action(function() table.insert(queue, -1) end, -1),
action(function() table.insert(queue, 0) end, 0),
action(function() table.insert(queue, 10) end, 10)
}
CHECK(testkit.seq(queue, { -1, 0, 2.5, 10, 100 }))
end
end)
TEST("changed()", wrap_root(function()