mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
This commit is contained in:
parent
1f0b734956
commit
866135b152
2 changed files with 65 additions and 16 deletions
|
|
@ -87,6 +87,42 @@ TEST("graph", function()
|
|||
CHECK(count == 3)
|
||||
end
|
||||
|
||||
do CASE "etst"
|
||||
--[[
|
||||
|
||||
root
|
||||
Items -> Indexes()
|
||||
|
||||
indexes_root
|
||||
v1 + sel -> bind
|
||||
v2 + sel -> bind
|
||||
|
||||
]]
|
||||
local items = create_node { 1, 2 }
|
||||
|
||||
local count = 0
|
||||
|
||||
local function effect()
|
||||
track(a)
|
||||
track(b)
|
||||
count += 1
|
||||
end
|
||||
|
||||
c.effect = effect
|
||||
|
||||
open_scope(c)
|
||||
|
||||
effect()
|
||||
|
||||
close_scope()
|
||||
|
||||
CHECK(count == 1)
|
||||
update(a)
|
||||
CHECK(count == 2)
|
||||
update(b)
|
||||
CHECK(count == 3)
|
||||
end
|
||||
|
||||
-- todo: further tests
|
||||
|
||||
do CASE "nodes garbage collection"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue