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\117\116\073\110\115\116\097\110\099\101",function()it("\067\111\110\110\101\099\116\115 \097 \108\105\115\116\101\110\101\114 \116\111 \097 \114\101\110\100\101\114\101\100 \105\110\115\116\097\110\099\101",function()local K=Instance.new("\070\114\097\109\101")local x=H.Premade("\070\114\097\109\101")local d=x:OutInstance();(expect(d:Current())).to.equal(nil)local b=H.Root(K)b:Render(x);(expect(d:Current())).to.equal(K)b:Unmount();(expect(d:Current())).to.equal(K)end)end)end
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local Dex = require(ReplicatedStorage.Packages.Dex)
return function()
    describe("OutInstance", function()
        it("Connects a listener to a rendered instance", function()
            local host = Instance.new("Frame")
            local virtualInstance = Dex.Premade("Frame")
            
            local instObs = virtualInstance:OutInstance()
            expect(instObs:Current()).to.equal(nil)

            local root = Dex.Root(host)
            root:Render(virtualInstance)
            expect(instObs:Current()).to.equal(host)

            root:Unmount()
            expect(instObs:Current()).to.equal(host)
        end)
    end)
end