return function()local Y=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local j=Y.Packages local D=require(j.Llama)local E=D.Set local T=E.intersection it("\115\104\111\117\108\100 \118\097\108\105\100\097\116\101 \116\121\112\101\115",function()local Y,j=pcall(function()T(0)end);(expect(string.find(j,"\101\120\112\101\099\116\101\100\044 \103\111\116"))).to.be.ok()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \110\101\119 \116\097\098\108\101",function()local Y={};(expect(T(Y))).never.to.equal(Y)end)it("\115\104\111\117\108\100 \110\111\116 \109\117\116\097\116\101 \112\097\115\115\101\100 \105\110 \116\097\098\108\101\115\040\115\041",function()local Y={foo=true,bar=true;baz=true}local j={foobar=true;barbaz=true,bazfoo=true}local D=0 local E=0 setmetatable(Y,{__newindex=function()D=D+1 end})setmetatable(j,{__newindex=function()E=E+1 end})T(Y,j);(expect(D)).to.equal(0);(expect(E)).to.equal(0)end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\104\101 \105\110\116\101\114\115\101\099\116\105\111\110\115 \098\101\116\119\101\101\110 \112\114\111\118\105\100\101\100 \115\101\116\115",function()local Y={foo=true,oof=true,ofo=true}local j={foo=true,bar=true,baz=true}local D={foo=true;barfoo=true;foobaz=true}local E=T(Y,j,D)for Y,j in pairs(E)do(expect(Y)).to.equal("\102\111\111")end end)end
return function()
	local ReplicatedStorage = game:GetService("ReplicatedStorage")

	local Packages = ReplicatedStorage.Packages
	local Llama = require(Packages.Llama)

	local Set = Llama.Set
	local intersection = Set.intersection

	it("should validate types", function()
		local _, err = pcall(function()
			intersection(0)
		end)

		expect(string.find(err, "expected, got")).to.be.ok()
	end)

	it("should return a new table", function()
		local a = {}

		expect(intersection(a)).never.to.equal(a)
	end)
	
	it("should not mutate passed in tables(s)", function()
		local a = {
			foo = true,
			bar = true,
			baz = true,
		}
		local b = {
			foobar = true,
			barbaz = true,
			bazfoo = true,
		}
		local mutationsA = 0
		local mutationsB = 0

		setmetatable(a, {
			__newindex = function()
				mutationsA = mutationsA + 1
			end
		})

		setmetatable(b, {
			__newindex = function()
				mutationsB = mutationsB + 1
			end
		})

		intersection(a, b)

		expect(mutationsA).to.equal(0)
		expect(mutationsB).to.equal(0)
	end)

	it("should return the intersections between provided sets", function()
		local a = {
			foo = true,
			oof = true,
			ofo = true,
		}
		local b = {
			foo = true,
			bar = true,
			baz = true,
		}
		local c = {
			foo = true,
			barfoo = true,
			foobaz = true,
		}

		local d = intersection(a, b, c)
		
		for k, _ in pairs(d) do
			expect(k).to.equal("foo")
		end
	end)
end