return function()local m=require(script.Parent.getBoundingBox)it("\115\104\111\117\108\100 \114\101\116\117\114\110 \116\104\101 \115\097\109\101 \112\111\105\110\116\115 \105\102 \103\105\118\101\110 \052 \111\114 \108\101\115\115 \112\111\105\110\116\115",function()for n=0,3,1 do local K={}for m=0,n,1 do table.insert(K,Vector2.new(n,n))end;(expect(m(K))).to.equal(K)end end)it("\115\104\111\117\108\100 \097\108\119\097\121\115 \114\101\116\117\114\110 \052 \112\111\105\110\116\115",function()local n={}for m=1,20,1 do local K=(math.pi/2)*m local k=math.cos(K)local i=math.sin(K)table.insert(n,Vector2.new(k,i))end local K=m(n);(expect(K[4].Y-K[1].Y)).to.equal(2);(expect(#K)).to.equal(4)end)end
return function()
	local getBoundingBox = require(script.Parent.getBoundingBox)

	it("should return the same points if given 4 or less points", function()
		for i = 0, 3 do
			local points = {}

			for _ = 0, i do
				table.insert(points, Vector2.new(i, i))
			end

			expect(getBoundingBox(points)).to.equal(points)
		end
	end)

	it("should always return 4 points", function()
		local points = {}
		for i = 1, 20 do
			-- Generate random points along a sin curve. When run through
			-- getBoundingBox() the resulting 4 points will represent a
			-- rectangle that is 2 units.
			local formula = (math.pi / 2) * i
			local x = math.cos(formula)
			local y = math.sin(formula)
			table.insert(points, Vector2.new(x, y))
		end

		local box = getBoundingBox(points)

		expect(box[4].Y - box[1].Y).to.equal(2)
		expect(#box).to.equal(4)
	end)
end
