local K=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local H=require(K.Packages.Dex)return function()describe("\079\110\077\111\117\110\116",function()it("\067\097\108\108\115 \097 \099\097\108\108\098\097\099\107 \111\110\099\101 \105\109\109\101\100\105\097\116\101\108\121 \119\104\101\110 \097 \086\105\114\116\117\097\108\073\110\115\116\097\110\099\101 \109\111\117\110\116\115",function()local K=Instance.new("\070\114\097\109\101")local x=H.Premade("\070\114\097\109\101")local d=0 x:OnMount(function()d+=1 end)local b=H.Root(K)b:Render(x);(expect(d)).to.equal(1)b:Unmount();(expect(d)).to.equal(1)end)end)end
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Dex = require(ReplicatedStorage.Packages.Dex)
return function()
    describe("OnMount", function()
        it("Calls a callback once immediately when a VirtualInstance mounts", function()
            local host = Instance.new("Frame")
            local virtualInstance = Dex.Premade("Frame")
            local callCount = 0
            virtualInstance:OnMount(function()
                callCount += 1
            end)
            local root = Dex.Root(host)
            root:Render(virtualInstance)
            expect(callCount).to.equal(1)

            root:Unmount()
            expect(callCount).to.equal(1)
        end)
    end)
end
