return function()local i=require(script.Parent.insert)it("\115\104\111\117\108\100 \105\110\115\101\114\116 \116\104\101 \103\105\118\101\110 \118\097\108\117\101\115 \105\110\116\111 \097\110 \097\114\114\097\121 \097\116 \116\104\101 \103\105\118\101\110 \105\110\100\101\120\044 \115\104\105\102\116\105\110\103 \097\108\108 \118\097\108\117\101\115 \097\102\116\101\114 \105\116 \116\111 \116\104\101 \114\105\103\104\116",function()local x={1,2;3}local u=i(x,2,4,5);(expect(u)).to.be.a("\116\097\098\108\101");(expect(#u)).to.equal(5);(expect(u[1])).to.equal(1);(expect(u[2])).to.equal(4);(expect(u[3])).to.equal(5);(expect(u[4])).to.equal(2);(expect(u[5])).to.equal(3)end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \110\101\103\097\116\105\118\101 \105\110\100\105\099\101\115",function()local x={1,2;3}local u=i(x,0,4,5)local l=i(x,-1,4,5);(expect(u)).to.be.a("\116\097\098\108\101");(expect(#u)).to.equal(5);(expect(u[5])).to.equal(5);(expect(l)).to.be.a("\116\097\098\108\101");(expect(#l)).to.equal(5);(expect(l[3])).to.equal(4);(expect(l[5])).to.equal(3)end)it("\115\104\111\117\108\100 \097\099\099\101\112\116 \108\101\110\103\116\104\043\049",function()local x={1;2;3}local u=i(x,4,4,5)local l=i(x,5,4)local q=i(x,0,4);(expect(u)).to.be.a("\116\097\098\108\101");(expect(#u)).to.equal(5);(expect(u[5])).to.equal(5);(expect(l)).to.be.a("\116\097\098\108\101");(expect(#l)).to.equal(3);(expect(l[3])).to.equal(3);(expect(q)).to.be.a("\116\097\098\108\101");(expect(#q)).to.equal(4);(expect(q[4])).to.equal(4)end)end
return function()
	local Insert = require(script.Parent.insert)

	it(
		"should insert the given values into an array at the given index, shifting all values after it to the right",
		function()
			local array = { 1, 2, 3 }

			local newArray = Insert(array, 2, 4, 5) -- { 1, 4, 5, 2, 3 }

			expect(newArray).to.be.a("table")
			expect(#newArray).to.equal(5)

			expect(newArray[1]).to.equal(1)
			expect(newArray[2]).to.equal(4)
			expect(newArray[3]).to.equal(5)
			expect(newArray[4]).to.equal(2)
			expect(newArray[5]).to.equal(3)
		end
	)

	it("should accept negative indices", function()
		local array = { 1, 2, 3 }

		local newArray = Insert(array, 0, 4, 5) -- { 1, 2, 3, 4, 5 }
		local newArray2 = Insert(array, -1, 4, 5) -- { 1, 2, 4, 5, 3 }

		expect(newArray).to.be.a("table")
		expect(#newArray).to.equal(5)
		expect(newArray[5]).to.equal(5)

		expect(newArray2).to.be.a("table")
		expect(#newArray2).to.equal(5)
		expect(newArray2[3]).to.equal(4)
		expect(newArray2[5]).to.equal(3)
	end)

	it("should accept length+1", function()
		local array = { 1, 2, 3 }

		local newArray = Insert(array, 4, 4, 5) -- { 1, 2, 3, 4, 5 }
		local newArray2 = Insert(array, 5, 4) -- { 1, 2, 3 }
		local newArray3 = Insert(array, 0, 4) -- { 1, 2, 3, 4 }

		expect(newArray).to.be.a("table")
		expect(#newArray).to.equal(5)
		expect(newArray[5]).to.equal(5)

		expect(newArray2).to.be.a("table")
		expect(#newArray2).to.equal(3)
		expect(newArray2[3]).to.equal(3)

		expect(newArray3).to.be.a("table")
		expect(#newArray3).to.equal(4)
		expect(newArray3[4]).to.equal(4)
	end)
end
