return function()local e=game:GetService("\067\111\108\108\101\099\116\105\111\110\083\101\114\118\105\099\101")local Z=require(script.Parent)it("\115\104\111\117\108\100 \098\101 \097 \102\117\110\099\116\105\111\110",function()(expect(Z)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \112\114\111\112\101\114 \097\110\099\101\115\116\111\114 \099\111\110\116\097\105\110\105\110\103 \112\097\115\115\101\100 \116\097\103",function()local m="\095\095\116\101\115\116\105\110\103\095\116\097\103\095\110\097\109\101"local J=Instance.new("\070\111\108\100\101\114")e:AddTag(J,m)local v=Instance.new("\070\111\108\100\101\114",J);(expect(Z(v,m))).to.equal(J)local X=Instance.new("\070\111\108\100\101\114",v);(expect(Z(X,m))).to.equal(J)e:RemoveTag(J,m);(expect(Z(v,m))).to.equal(nil);(expect(Z(X,m))).to.equal(nil)J:Destroy()end)end
return function()
	local CollectionService = game:GetService("CollectionService")

	local findFirstAncestorOfTag = require(script.Parent)

	it("should be a function", function()
		expect(findFirstAncestorOfTag).to.be.a("function")
	end)

	it("should return proper ancestor containing passed tag", function()
		local tag = "__testing_tag_name"
		local folder_1 = Instance.new("Folder")

		CollectionService:AddTag(folder_1, tag)

		local folder_2 = Instance.new("Folder", folder_1)

		expect(findFirstAncestorOfTag(folder_2, tag)).to.equal(folder_1)

		local folder_3 = Instance.new("Folder", folder_2)

		expect(findFirstAncestorOfTag(folder_3, tag)).to.equal(folder_1)

		CollectionService:RemoveTag(folder_1, tag)

		expect(findFirstAncestorOfTag(folder_2, tag)).to.equal(nil)
		expect(findFirstAncestorOfTag(folder_3, tag)).to.equal(nil)

		folder_1:Destroy()
	end)
end
