Support nesting Parent (#48)

* allow nesting parent property

* update changelog

* fix mock instances Parent property not being a proxy

* add tests

Closes #47
This commit is contained in:
EwDev 2025-02-23 22:31:26 +01:00 committed by GitHub
parent 7064489a36
commit 37e8e05206
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 39 additions and 21 deletions

View file

@ -759,6 +759,13 @@ TEST("create()", wrap_root(function()
CHECK(text.Text == "test")
end
do CASE "set nested parent"
local frame = create "Frame" {}
local text = create "TextLavel" { { Parent = frame } }
CHECK(frame:GetChildren()[1] == text)
CHECK(text.Parent == frame)
end
do CASE "nested deferred"
local text = create "TextLabel" {
{