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 \100\105\099\116\105\111\110\097\114\121",function()local R={hello="\114\111\098\108\111\120",goodbye="\119\111\114\108\100"}local o=i(R);(expect(o)).to.be.a("\116\097\098\108\101");(expect(o)).never.to.equal(R);(expect(o.hello)).to.equal("\114\111\098\108\111\120");(expect(o.goodbye)).to.equal("\119\111\114\108\100");(expect(function()o.hello="\119\111\114\108\100"end)).to.throw()end)it("\115\104\111\117\108\100 \102\114\101\101\122\101 \110\101\115\116\101\100 \100\105\099\116\105\111\110\097\114\105\101\115",function()local R={hello="\114\111\098\108\111\120";goodbye={world="\103\111\111\100\098\121\101"}}local o=i(R);(expect(o)).to.be.a("\116\097\098\108\101");(expect(o)).never.to.equal(R);(expect(o.hello)).to.equal("\114\111\098\108\111\120");(expect(o.goodbye)).to.be.a("\116\097\098\108\101");(expect(o.goodbye)).never.to.equal(R.goodbye);(expect(o.goodbye.world)).to.equal("\103\111\111\100\098\121\101");(expect(function()o.hello="\119\111\114\108\100"end)).to.throw();(expect(function()o.goodbye.world="\104\101\108\108\111"end)).to.throw()end)end
return function()
	local FreezeDeep = require(script.Parent.freezeDeep)

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

		local frozen = FreezeDeep(dictionary)

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

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

		expect(function()
			frozen.hello = "world"
		end).to.throw()
	end)

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

		local frozen = FreezeDeep(dictionary)

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

		expect(frozen.hello).to.equal("roblox")

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

		expect(frozen.goodbye.world).to.equal("goodbye")

		expect(function()
			frozen.hello = "world"
		end).to.throw()

		expect(function()
			frozen.goodbye.world = "hello"
		end).to.throw()
	end)
end
