return function()local v=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local E=v.Packages local L=require(E.Llama)local C=L.Dictionary local p=C.flip it("\115\104\111\117\108\100 \118\097\108\105\100\097\116\101 \116\121\112\101\115",function()local v,E=pcall(function()p(0)end);(expect(string.find(E,"\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 v={}local E=p(v);(expect(v)).never.to.equal(E)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",function()local v={foo="\111\111\102",bar="\114\097\098",baz="\122\097\098"}local E=0 setmetatable(v,{__newindex=function()E=E+1 end})p(v);(expect(E)).to.equal(0)end)it("\115\104\111\117\108\100 \102\108\105\112 \107\101\121\115 \097\110\100 \118\097\108\117\101\115",function()local v={foo="\111\111\102";bar="\114\097\098",baz="\122\097\098"}local E=p(v)for E,L in pairs(E)do(expect(E)).to.equal(v[L])end end)it("\115\104\111\117\108\100 \119\111\114\107 \119\105\116\104 \101\109\112\116\121 \116\097\098\108\101\115",function()(expect(p({}))).to.be.a("\116\097\098\108\101")end)end
return function()
	local ReplicatedStorage = game:GetService("ReplicatedStorage")

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

	local Dictionary = Llama.Dictionary
	local flip = Dictionary.flip

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

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

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

		expect(a).never.to.equal(b)
	end)

	it("should not mutate passed in tables", function()
		local a = {
			foo = "oof",
			bar = "rab",
			baz = "zab",
		}
		local mutations = 0

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

		flip(a)

		expect(mutations).to.equal(0)
	end)

	it("should flip keys and values", function()
		local a = {
			foo = "oof",
			bar = "rab",
			baz = "zab",
		}

		local b = flip(a)

		for k, v in pairs(b) do
			expect(k).to.equal(a[v])
		end
	end)

	it("should work with empty tables", function()
		expect(flip({})).to.be.a("table")
	end)
end