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

	it("should sort the given array", function()
		local array = { 1, 2, 3 }

		local new = Sort(array, function(a, b)
			return a < b
		end)

		expect(new).to.be.a("table")
		expect(#new).to.equal(3)
		expect(new[1]).to.equal(1)
		expect(new[2]).to.equal(2)
		expect(new[3]).to.equal(3)
	end)

	it("should sort the given array with a custom compare function", function()
		local array = { 1, 2, 3 }

		local new = Sort(array, function(a, b)
			return a > b
		end)

		expect(new).to.be.a("table")
		expect(#new).to.equal(3)
		expect(new[1]).to.equal(3)
		expect(new[2]).to.equal(2)
		expect(new[3]).to.equal(1)
	end)

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

		Sort(array, function(a, b)
			return a > b
		end)

		expect(array).to.be.a("table")
		expect(array[1]).to.equal(1)
		expect(array[2]).to.equal(2)
		expect(array[3]).to.equal(3)
	end)
end
