return function()local U=require(script.Parent.removeIndex)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \116\104\101 \101\108\101\109\101\110\116 \097\116 \116\104\101 \103\105\118\101\110 \105\110\100\101\120",function()local k={1,2;3}local t=U(k,2);(expect(t[1])).to.equal(1);(expect(t[2])).to.equal(3);(expect(t[3])).never.to.be.ok()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 k={1;2,3}U(k,2);(expect(k[2])).to.equal(2)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \097\110 \101\108\101\109\101\110\116 \097\116 \116\104\101 \103\105\118\101\110 \110\101\103\097\116\105\118\101 \105\110\100\101\120",function()local k={1,2;3}local t=U(k,-1);(expect(t[1])).to.equal(1);(expect(t[2])).to.equal(3);(expect(t[3])).never.to.be.ok()end)end
return function()
	local RemoveIndex = require(script.Parent.removeIndex)

	it("should remove the element at the given index", function()
		local array = { 1, 2, 3 }

		local removed = RemoveIndex(array, 2)

		expect(removed[1]).to.equal(1)
		expect(removed[2]).to.equal(3)
		expect(removed[3]).never.to.be.ok()
	end)

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

		RemoveIndex(array, 2)

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

	it("should remove an element at the given negative index", function()
		local array = { 1, 2, 3 }

		local removed = RemoveIndex(array, -1)

		expect(removed[1]).to.equal(1)
		expect(removed[2]).to.equal(3)
		expect(removed[3]).never.to.be.ok()
	end)
end
