return function()local i=require(script.Parent.freezeDeep)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \114\101\097\100-\111\110\108\121 \099\111\112\121 \111\102 \116\104\101 \103\105\118\101\110 \097\114\114\097\121",function()local p={1,2,3}local y=i(p);(expect(y)).to.be.a("\116\097\098\108\101");(expect(y)).never.to.equal(p);(expect(#y)).to.equal(3);(expect(y[1])).to.equal(1);(expect(y[2])).to.equal(2);(expect(y[3])).to.equal(3);(expect(function()y[1]=4 end)).to.throw()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \114\101\097\100-\111\110\108\121 \099\111\112\121 \111\102 \110\101\115\116\101\100 \097\114\114\097\121\115",function()local p={1,2,{3,4}}local y=i(p);(expect(y)).to.be.a("\116\097\098\108\101");(expect(y)).never.to.equal(p);(expect(#y)).to.equal(3);(expect(y[1])).to.equal(1);(expect(y[2])).to.equal(2);(expect(y[3])).to.be.a("\116\097\098\108\101");(expect(y[3])).never.to.equal(p[3]);(expect(#y[3])).to.equal(2);(expect(y[3][1])).to.equal(3);(expect(y[3][2])).to.equal(4);(expect(function()y[1]=4 end)).to.throw();(expect(function()y[3][1]=5 end)).to.throw()end)end
return function()
	local FreezeDeep = require(script.Parent.freezeDeep)

	it("should return a read-only copy of the given array", function()
		local array = { 1, 2, 3 }

		local frozen = FreezeDeep(array)

		expect(frozen).to.be.a("table")
		expect(frozen).never.to.equal(array)
		expect(#frozen).to.equal(3)

		expect(frozen[1]).to.equal(1)
		expect(frozen[2]).to.equal(2)
		expect(frozen[3]).to.equal(3)

		expect(function()
			frozen[1] = 4
		end).to.throw()
	end)

	it("should return a read-only copy of nested arrays", function()
		local array = { 1, 2, { 3, 4 } }

		local frozen = FreezeDeep(array)

		expect(frozen).to.be.a("table")
		expect(frozen).never.to.equal(array)
		expect(#frozen).to.equal(3)

		expect(frozen[1]).to.equal(1)
		expect(frozen[2]).to.equal(2)
		expect(frozen[3]).to.be.a("table")
		expect(frozen[3]).never.to.equal(array[3])
		expect(#frozen[3]).to.equal(2)

		expect(frozen[3][1]).to.equal(3)
		expect(frozen[3][2]).to.equal(4)

		expect(function()
			frozen[1] = 4
		end).to.throw()

		expect(function()
			frozen[3][1] = 5
		end).to.throw()
	end)
end
