return function()local w=require(script.Parent.copyDeep)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \099\111\112\121 \111\102 \116\104\101 \103\105\118\101\110 \100\105\099\116\105\111\110\097\114\121",function()local G={hello="\119\111\114\108\100"}local b=w(G);(expect(b)).to.be.a("\116\097\098\108\101");(expect(b)).never.to.equal(G);(expect(b.hello)).to.equal("\119\111\114\108\100")end)it("\115\104\111\117\108\100 \099\111\112\121 \110\101\115\116\101\100 \100\105\099\116\105\111\110\097\114\105\101\115",function()local G={hello={world="\103\111\111\100\098\121\101"}}local b=w(G);(expect(b)).to.be.a("\116\097\098\108\101");(expect(b)).never.to.equal(G);(expect(b.hello)).to.be.a("\116\097\098\108\101");(expect(b.hello)).never.to.equal(G.hello);(expect(b.hello.world)).to.equal("\103\111\111\100\098\121\101")end)it("\115\104\111\117\108\100 \099\111\112\121 \109\101\116\097\116\097\098\108\101\115",function()local G=setmetatable({},{__index=function() end})local b={hello={};world={},meta=G}local D=w(b);(expect(D)).to.be.a("\116\097\098\108\101");(expect(D)).never.to.equal(b);(expect(function()return getmetatable(D[3])end)).to.be.a("\102\117\110\099\116\105\111\110")end)end
return function()
	local CopyDeep = require(script.Parent.copyDeep)

	it("should return a copy of the given dictionary", function()
		local dictionary = {
			hello = "world",
		}

		local new = CopyDeep(dictionary)

		expect(new).to.be.a("table")
		expect(new).never.to.equal(dictionary)

		expect(new.hello).to.equal("world")
	end)

	it("should copy nested dictionaries", function()
		local dictionary = {
			hello = {
				world = "goodbye",
			},
		}

		local new = CopyDeep(dictionary)

		expect(new).to.be.a("table")
		expect(new).never.to.equal(dictionary)

		expect(new.hello).to.be.a("table")
		expect(new.hello).never.to.equal(dictionary.hello)

		expect(new.hello.world).to.equal("goodbye")
	end)

	it("should copy metatables", function()
		local meta = setmetatable({}, { __index = function() end })
		local dictionary = {
			hello = {},
			world = {},
			meta = meta,
		}

		local new = CopyDeep(dictionary)

		expect(new).to.be.a("table")
		expect(new).never.to.equal(dictionary)

		expect(function()
			return getmetatable(new[3])
		end).to.be.a("function")
	end)
end
