mirror of
https://github.com/centau/vide.git
synced 2026-08-20 14:41:37 +00:00
Update tests
Added a case to confirm the behavior of strict mode's double evaluation and node cached values.
This commit is contained in:
parent
d07c705b64
commit
2ae65a0194
1 changed files with 16 additions and 0 deletions
|
|
@ -2019,6 +2019,22 @@ TEST("strict", wrap_root(function()
|
|||
|
||||
CHECK(ok)
|
||||
end
|
||||
|
||||
do CASE "effect counter"
|
||||
local src = source(true)
|
||||
|
||||
local count = 0
|
||||
|
||||
effect(function(x: number)
|
||||
src()
|
||||
count = x + 1
|
||||
return count
|
||||
end, count)
|
||||
|
||||
CHECK(count == 2)
|
||||
src(not src())
|
||||
CHECK(count == 4)
|
||||
end
|
||||
end))
|
||||
|
||||
local ok = FINISH()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue