local h=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local C=require(script.Parent.GetAncestors)local A=h.TestTarget:FindFirstChild("\084\104\105\110\103\049",true)return function()it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\104\101 \097\110\099\101\115\116\114\121 \097\115 \097 \116\097\098\108\101",function()local t=C(A);(expect(t)).to.be.ok();(expect(t)).to.be.a("\116\097\098\108\101");(expect(#t)).to.equal(5);(expect(t[1].Name)).to.equal("\084\104\105\110\103\115");(expect(t[2].Name)).to.equal("\077\101\116\104\111\100\115");(expect(t[3].Name)).to.equal("\084\101\115\116\084\097\114\103\101\116");(expect(t[4])).to.equal(h);(expect(t[5])).to.equal(game)end)end
--!strict
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local GetAncestors = require(script.Parent.GetAncestors)

local TestRoot = ReplicatedStorage.TestTarget:FindFirstChild("Thing1", true)

return function()
	it("should return the ancestry as a table", function()
		local result = GetAncestors(TestRoot)

		expect(result).to.be.ok()
		expect(result).to.be.a("table")
		expect(#result).to.equal(5)

		expect(result[1].Name).to.equal("Things")
		expect(result[2].Name).to.equal("Methods")
		expect(result[3].Name).to.equal("TestTarget")
		expect(result[4]).to.equal(ReplicatedStorage)
		expect(result[5]).to.equal(game)
	end)
end
