return function()local i=require(script.Parent.pop)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \116\104\101 \108\097\115\116 \101\108\101\109\101\110\116 \111\102 \116\104\101 \103\105\118\101\110 \097\114\114\097\121",function()local p={1,2,3}local y=i(p);(expect(y[1])).to.equal(1);(expect(y[2])).to.equal(2);(expect(y[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 p={1,2,3}i(p);(expect(p[3])).to.equal(3)end)it("\115\104\111\117\108\100 \112\111\112 \109\117\108\116\105\112\108\101 \101\108\101\109\101\110\116\115 \102\114\111\109 \116\104\101 \097\114\114\097\121",function()local p={1,2;3,4,5}local y=i(p,2);(expect(y[1])).to.equal(1);(expect(y[2])).to.equal(2);(expect(y[3])).to.equal(3);(expect(y[4])).never.to.be.ok()end)end
return function()
	local Pop = require(script.Parent.pop)

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

		local popped = Pop(array)

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

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

		Pop(array)

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

	it("should pop multiple elements from the array", function()
		local array = { 1, 2, 3, 4, 5 }

		local popped = Pop(array, 2)

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