return function()local l=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 \097\114\114\097\121",function()local S={1,2;3}local h=l(S);(expect(h)).to.be.a("\116\097\098\108\101");(expect(h)).never.to.equal(S);(expect(h[1])).to.equal(1);(expect(h[2])).to.equal(2);(expect(h[3])).to.equal(3)end)it("\115\104\111\117\108\100 \099\111\112\121 \110\101\115\116\101\100 \097\114\114\097\121\115",function()local S={1,2,{3,4}}local h=l(S);(expect(h)).to.be.a("\116\097\098\108\101");(expect(h)).never.to.equal(S);(expect(h[1])).to.equal(1);(expect(h[2])).to.equal(2);(expect(h[3])).never.to.equal(S[3])end)it("\115\104\111\117\108\100 \099\111\112\121 \109\101\116\097\116\097\098\108\101\115",function()local S=setmetatable({},{__index=function() end})local h={{1;2;3};{4;5;6},S}local z=l(h);(expect(z)).to.be.a("\116\097\098\108\101");(expect(z)).never.to.equal(h);(expect(function()return getmetatable(z[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 array", function()
		local array = { 1, 2, 3 }

		local new = CopyDeep(array)

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

		expect(new[1]).to.equal(1)
		expect(new[2]).to.equal(2)
		expect(new[3]).to.equal(3)
	end)

	it("should copy nested arrays", function()
		local array = { 1, 2, { 3, 4 } }

		local new = CopyDeep(array)

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

		expect(new[1]).to.equal(1)
		expect(new[2]).to.equal(2)
		expect(new[3]).never.to.equal(array[3])
	end)

	it("should copy metatables", function()
		local meta = setmetatable({}, { __index = function() end })
		local array = { { 1, 2, 3 }, { 4, 5, 6 }, meta }

		local new = CopyDeep(array)

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

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