return function()local d=game:GetService("\082\101\112\108\105\099\097\116\101\100\083\116\111\114\097\103\101")local S=d.Packages local E=require(S.Llama)local P=E.List local V=P.reverse it("\115\104\111\117\108\100 \118\097\108\105\100\097\116\101 \116\121\112\101\115",function()local d,S=pcall(function()V(0)end);(expect(string.find(S,"\101\120\112\101\099\116\101\100\044 \103\111\116"))).to.be.ok()end)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \097 \110\101\119 \116\097\098\108\101",function()local d={1,2;3};(expect(V(d))).never.to.equal(d)end)it("\115\104\111\117\108\100 \110\111\116 \109\117\116\097\116\101 \112\097\115\115\101\100 \105\110 \116\097\098\108\101\115",function()local d={"\102\111\111";"\098\097\114"}local S=0 setmetatable(d,{__newindex=function()S=S+1 end})V(d);(expect(S)).to.equal(0)end)it("\115\104\111\117\108\100 \099\111\110\116\097\105\110 \116\104\101 \115\097\109\101 \101\108\101\109\101\110\116\115",function()local d={"\102\111\111";"\098\097\114"}local S={foo=true,bar=true}local E=V(d);(expect(#E)).to.equal(2)for d,E in ipairs(E)do(expect(S[E])).to.equal(true)end end)it("\115\104\111\117\108\100 \114\101\118\101\114\115\101 \116\104\101 \108\105\115\116",function()local d={1,2;3;4}local S=V(d);(expect(S[1])).to.equal(4);(expect(S[2])).to.equal(3);(expect(S[3])).to.equal(2);(expect(S[4])).to.equal(1)end)end
return function()
	local ReplicatedStorage = game:GetService("ReplicatedStorage")

	local Packages = ReplicatedStorage.Packages
	local Llama = require(Packages.Llama)

	local List = Llama.List
	local reverse = List.reverse

	it("should validate types", function()
		local _, err = pcall(function()
			reverse(0)
		end)

		expect(string.find(err, "expected, got")).to.be.ok()
	end)

	it("should return a new table", function()
		local a = { 1, 2, 3 }

		expect(reverse(a)).never.to.equal(a)
	end)

	it("should not mutate passed in tables", function()
		local a = { "foo", "bar" }
		local mutations = 0

		setmetatable(a, {
			__newindex = function()
				mutations = mutations + 1
			end,
		})

		reverse(a)

		expect(mutations).to.equal(0)
	end)

	it("should contain the same elements", function()
		local a = {
			"foo",
			"bar"
		}
		local aSet = {
			foo = true,
			bar = true
		}
		local b = reverse(a)

		expect(#b).to.equal(2)

		for _, value in ipairs(b) do
			expect(aSet[value]).to.equal(true)
		end
	end)

	it("should reverse the list", function()
		local a = { 1, 2, 3, 4 }
		local b = reverse(a)

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