return function()local C=require(script.Parent:FindFirstChild("\070\105\110\100\070\105\114\115\116\065\110\099\101\115\116\111\114"))describe("\098\121\080\114\101\100\105\099\097\116\101",function()it("\115\104\111\117\108\100 \102\105\110\100 \073\110\115\116\097\110\099\101\115 \099\111\110\100\105\116\105\111\110\097\108\108\121",function()local f=C.byPredicate(workspace.Terrain,function(C)return C:IsA("\077\111\100\101\108")and C:GetScale()==1 end);(expect(f)).to.equal(workspace)end)end)describe("\098\121\078\097\109\101",function()it("\115\104\111\117\108\100 \102\105\110\100 \073\110\115\116\097\110\099\101\115 \099\111\110\100\105\116\105\111\110\097\108\108\121",function()local f=C.byName(workspace.Terrain,"\087\111\114\107\115\112\097\099\101");(expect(f)).to.equal(workspace)end)end)describe("\111\102\067\108\097\115\115",function()it("\115\104\111\117\108\100 \102\105\110\100 \073\110\115\116\097\110\099\101\115 \099\111\110\100\105\116\105\111\110\097\108\108\121",function()local f=C.ofClass(workspace.Terrain,"\087\111\114\107\115\112\097\099\101");(expect(f)).to.equal(workspace)end)end)describe("\119\104\105\099\104\073\115\065",function()it("\115\104\111\117\108\100 \102\105\110\100 \073\110\115\116\097\110\099\101\115 \099\111\110\100\105\116\105\111\110\097\108\108\121",function()local f=C.whichIsA(workspace.Terrain,"\077\111\100\101\108");(expect(f)).to.equal(workspace)end)end)describe("\098\121\068\101\112\116\104",function()it("\115\104\111\117\108\100 \102\105\110\100 \073\110\115\116\097\110\099\101\115 \099\111\110\100\105\116\105\111\110\097\108\108\121",function()local f=C.byDepth(workspace.Terrain,2);(expect(f)).to.equal(game)end)end)end
--!strict

return function()
	local FindFirstAncestor = require(script.Parent:FindFirstChild("FindFirstAncestor"))

	describe("byPredicate", function()
		it("should find Instances conditionally", function()
			local found = FindFirstAncestor.byPredicate(workspace.Terrain, function(parent)
				return parent:IsA("Model") and parent:GetScale() == 1
			end)

			expect(found).to.equal(workspace)
		end)
	end)

	describe("byName", function()
		it("should find Instances conditionally", function()
			local found = FindFirstAncestor.byName(workspace.Terrain, "Workspace")

			expect(found).to.equal(workspace)
		end)
	end)

	describe("ofClass", function()
		it("should find Instances conditionally", function()
			local found = FindFirstAncestor.ofClass(workspace.Terrain, "Workspace")

			expect(found).to.equal(workspace)
		end)
	end)

	describe("whichIsA", function()
		it("should find Instances conditionally", function()
			local found = FindFirstAncestor.whichIsA(workspace.Terrain, "Model")

			expect(found).to.equal(workspace)
		end)
	end)

	describe("byDepth", function()
		it("should find Instances conditionally", function()
			local found = FindFirstAncestor.byDepth(workspace.Terrain, 2)

			expect(found).to.equal(game)
		end)
	end)
end
