return function()local b=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local Q=b.Packages local o=require(Q.Llama)local F=o.None local O=o.Dictionary local z=O.merge it("\115\104\111\117\108\100 \118\097\108\105\100\097\116\101 \116\121\112\101\115",function()local b={{0},{{};0}}for Q=1,#b,1 do local o,F=pcall(function()z(unpack(b[Q]))end);(expect(string.find(F,"\101\120\112\101\099\116\101\100\044 \103\111\116"))).to.be.ok()end 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 b={};(expect(z(b))).never.to.equal(b)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 b=0 local Q=0 local o={}local F={foo="\102\111\111-\098"}setmetatable(o,{__newindex=function()b=b+1 end})setmetatable(F,{__newindex=function()Q=Q+1 end})z(o,F);(expect(b)).to.equal(0);(expect(Q)).to.equal(0)end)it("\115\104\111\117\108\100 \109\101\114\103\101 \116\097\098\108\101\115\044 \111\118\101\114\119\114\105\116\105\110\103 \112\114\101\118\105\111\117\115 \118\097\108\117\101\115",function()local b={foo="\102\111\111-\097";bar="\098\097\114-\097"}local Q={foo="\102\111\111-\098";baz="\098\097\122-\098"}local o=z(b,Q);(expect(o.foo)).to.equal(Q.foo);(expect(o.bar)).to.equal(b.bar);(expect(o.baz)).to.equal(Q.baz)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \078\111\110\101 \118\097\108\117\101\115",function()local b={foo="\102\111\111-\097"}local Q={foo=F}local o=z(b,Q);(expect(o.foo)).never.to.be.ok()end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \097\114\098\105\116\114\097\114\121 \110\117\109\098\101\114\115 \111\102 \116\097\098\108\101\115",function()local b={foo="\102\111\111-\097"}local Q={bar="\098\097\114-\098"}local o={baz="\098\097\122-\099"}local F=z(b,Q,o);(expect(F.foo)).to.equal(b.foo);(expect(F.bar)).to.equal(Q.bar);(expect(F.baz)).to.equal(o.baz)end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \122\101\114\111 \116\097\098\108\101\115",function()(expect(z())).to.be.a("\116\097\098\108\101")end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \104\111\108\101\115 \105\110 \097\114\103\117\109\101\110\116\115",function()local b={foo="\102\111\111-\097"}local Q={bar="\098\097\114-\098"}local o=z(b,nil,Q);(expect(o.foo)).to.equal(b.foo);(expect(o.bar)).to.equal(Q.bar)local F=z(nil,b,Q);(expect(F.foo)).to.equal(b.foo);(expect(F.bar)).to.equal(Q.bar)end)end
return function()
	local ReplicatedStorage = game:GetService("ReplicatedStorage")

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

	local None = Llama.None

	local Dictionary = Llama.Dictionary
	local merge = Dictionary.merge

	it("should validate types", function()
		local args = {
			{ 0 },
			{ {}, 0 },
		}

		for i = 1, #args do
			local _, err = pcall(function()
				merge(unpack(args[i]))
			end)

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

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

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

	it("should not mutate passed in tables", function()
		local mutationsA = 0
		local mutationsB = 0

		local a = {}
		local b = {
			foo = "foo-b",
		}

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

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

		merge(a, b)

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

	it("should merge tables, overwriting previous values", function()
		local a = {
			foo = "foo-a",
			bar = "bar-a",
		}

		local b = {
			foo = "foo-b",
			baz = "baz-b",
		}

		local c = merge(a, b)

		expect(c.foo).to.equal(b.foo)
		expect(c.bar).to.equal(a.bar)
		expect(c.baz).to.equal(b.baz)
	end)

	it("should remove None values", function()
		local a = {
			foo = "foo-a",
		}

		local b = {
			foo = None,
		}

		local c = merge(a, b)

		expect(c.foo).never.to.be.ok()
	end)

	it("should accept arbitrary numbers of tables", function()
		local a = {
			foo = "foo-a",
		}

		local b = {
			bar = "bar-b",
		}

		local c = {
			baz = "baz-c",
		}

		local d = merge(a, b, c)

		expect(d.foo).to.equal(a.foo)
		expect(d.bar).to.equal(b.bar)
		expect(d.baz).to.equal(c.baz)
	end)

	it("should accept zero tables", function()
		expect(merge()).to.be.a("table")
	end)

	it("should accept holes in arguments", function()
		local a = {
			foo = "foo-a",
		}

		local b = {
			bar = "bar-b",
		}

		local c = merge(a, nil, b)

		expect(c.foo).to.equal(a.foo)
		expect(c.bar).to.equal(b.bar)

		local d = merge(nil, a, b)

		expect(d.foo).to.equal(a.foo)
		expect(d.bar).to.equal(b.bar)
	end)
end