return function()local D=require(script.Parent.map)it("\115\104\111\117\108\100 \109\097\112 \097 \115\101\116",function()local B={hello=true;world=true}local Q=D(B,function(D)return D.."\033"end);(expect(Q)).to.be.a("\116\097\098\108\101");(expect(Q)).never.to.equal(B);(expect(Q.hello)).to.equal(nil);(expect(Q.world)).to.equal(nil);(expect(Q["\104\101\108\108\111\033"])).to.equal(true);(expect(Q["\119\111\114\108\100\033"])).to.equal(true)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 \115\101\116",function()local B={hello=true}D(B,function(D)return D.."\033"end);(expect(B)).to.be.a("\116\097\098\108\101");(expect(B.hello)).to.equal(true)end)end
return function()
	local map = require(script.Parent.map)

	it("should map a set", function()
		local set = { hello = true, world = true }

		local newSet = map(set, function(value)
			return value .. "!"
		end)

		expect(newSet).to.be.a("table")
		expect(newSet).never.to.equal(set)

		expect(newSet.hello).to.equal(nil)
		expect(newSet.world).to.equal(nil)

		expect(newSet["hello!"]).to.equal(true)
		expect(newSet["world!"]).to.equal(true)
	end)

	it("should not modify the original set", function()
		local set = { hello = true }

		map(set, function(value)
			return value .. "!"
		end)

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

		expect(set.hello).to.equal(true)
	end)
end
