return function()local g=require(script.Parent.map)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097\110 \097\114\114\097\121 \119\104\101\114\101 \118\097\108\117\101\115 \097\114\101 \116\104\101 \114\101\115\117\108\116 \111\102 \116\104\101 \109\097\112\112\101\114 \102\117\110\099\116\105\111\110",function()local X=g({1;2;3},function(g)return g*2 end);(expect(X)).to.be.a("\116\097\098\108\101");(expect(#X)).to.equal(3);(expect(X[1])).to.equal(2);(expect(X[2])).to.equal(4);(expect(X[3])).to.equal(6)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 \097\114\114\097\121",function()local X={1;2;3}g(X,function(g)return g*2 end);(expect(X)).to.be.a("\116\097\098\108\101");(expect(#X)).to.equal(3);(expect(X[1])).to.equal(1);(expect(X[2])).to.equal(2);(expect(X[3])).to.equal(3)end)end
return function()
	local Map = require(script.Parent.map)

	it("should return an array where values are the result of the mapper function", function()
		local array = Map({ 1, 2, 3 }, function(value)
			return value * 2
		end)

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

		expect(array[1]).to.equal(2)
		expect(array[2]).to.equal(4)
		expect(array[3]).to.equal(6)
	end)

	it("should not modify the original array", function()
		local array = { 1, 2, 3 }

		Map(array, function(value)
			return value * 2
		end)

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

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