return function()local H=require(script.Parent.mergeDeep)local n=require(script.Parent.Parent.None)it("\115\104\111\117\108\100 \099\111\109\098\105\110\101 \116\119\111 \111\114 \109\111\114\101 \100\105\099\116\105\111\110\097\114\105\101\115\044 \119\104\101\114\101 \116\104\101 \108\097\115\116 \118\097\108\117\101 \111\118\101\114\114\105\100\101\115 \112\114\101\118\105\111\117\115\044 \114\101\099\117\114\115\105\118\101\108\121",function()local n={hello="\114\111\098\108\111\120";goodbye={world="\119\111\114\108\100"}}local E={goodbye={world="\104\101\108\108\111"}}local f=H(n,E);(expect(f)).to.be.a("\116\097\098\108\101");(expect(f.hello)).to.equal("\114\111\098\108\111\120");(expect(f.goodbye.world)).to.equal("\104\101\108\108\111")end)it("\115\104\111\117\108\100 \110\111\116 \109\111\100\105\102\121 \116\104\101 \111\114\105\103\105\110\097\108 \100\105\099\116\105\111\110\097\114\105\101\115",function()local n={hello="\114\111\098\108\111\120",goodbye={world="\119\111\114\108\100"}}local E={goodbye={world="\104\101\108\108\111"}}H(n,E);(expect(n)).to.be.a("\116\097\098\108\101");(expect(E)).to.be.a("\116\097\098\108\101");(expect(n.hello)).to.equal("\114\111\098\108\111\120");(expect(n.goodbye.world)).to.equal("\119\111\114\108\100")end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \110\105\108 \118\097\108\117\101\115",function()local n={hello="\114\111\098\108\111\120",goodbye={world="\119\111\114\108\100"}}local E=H(n,nil)local f=H(nil,n);(expect(E)).to.be.a("\116\097\098\108\101");(expect(E.hello)).to.equal("\114\111\098\108\111\120");(expect(E.goodbye.world)).to.equal("\119\111\114\108\100");(expect(f)).to.be.a("\116\097\098\108\101");(expect(f.hello)).to.equal("\114\111\098\108\111\120");(expect(f.goodbye.world)).to.equal("\119\111\114\108\100")end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \118\097\108\117\101\115 \115\101\116 \116\111 \078\111\110\101",function()local E={hello="\114\111\098\108\111\120";goodbye={world="\119\111\114\108\100"}}local f={goodbye=n}local X=H(E,f);(expect(X)).to.be.a("\116\097\098\108\101");(expect(X.hello)).to.equal("\114\111\098\108\111\120");(expect(X.goodbye)).to.equal(nil)end)end
return function()
	local MergeDeep = require(script.Parent.mergeDeep)
	local None = require(script.Parent.Parent.None)

	it("should combine two or more dictionaries, where the last value overrides previous, recursively", function()
		local dictionary1 = { hello = "roblox", goodbye = { world = "world" } }
		local dictionary2 = { goodbye = { world = "hello" } }

		local merged = MergeDeep(dictionary1, dictionary2)

		expect(merged).to.be.a("table")

		expect(merged.hello).to.equal("roblox")
		expect(merged.goodbye.world).to.equal("hello")
	end)

	it("should not modify the original dictionaries", function()
		local dictionary1 = { hello = "roblox", goodbye = { world = "world" } }
		local dictionary2 = { goodbye = { world = "hello" } }

		MergeDeep(dictionary1, dictionary2)

		expect(dictionary1).to.be.a("table")
		expect(dictionary2).to.be.a("table")

		expect(dictionary1.hello).to.equal("roblox")
		expect(dictionary1.goodbye.world).to.equal("world")
	end)

	it("should accept nil values", function()
		local dictionary1 = { hello = "roblox", goodbye = { world = "world" } }

		local merged = MergeDeep(dictionary1, nil)
		local merged2 = MergeDeep(nil, dictionary1)

		expect(merged).to.be.a("table")

		expect(merged.hello).to.equal("roblox")
		expect(merged.goodbye.world).to.equal("world")

		expect(merged2).to.be.a("table")

		expect(merged2.hello).to.equal("roblox")
		expect(merged2.goodbye.world).to.equal("world")
	end)

	it("should remove values set to None", function()
		local dictionary1 = { hello = "roblox", goodbye = { world = "world" } }
		local dictionary2 = { goodbye = None }

		local merged = MergeDeep(dictionary1, dictionary2)

		expect(merged).to.be.a("table")

		expect(merged.hello).to.equal("roblox")
		expect(merged.goodbye).to.equal(nil)
	end)
end
