return function()local Q=require(script.Parent.SingleMotor)local R=require(script.Parent.Linear)describe("\099\111\109\112\108\101\116\101\100 \115\116\097\116\101",function()local w=Q.new(0,false)local S=R.new(1,{velocity=1})w:setGoal(S)for Q=1,60,1 do w:step(.016666666666667)end it("\115\104\111\117\108\100 \099\111\109\112\108\101\116\101",function()(expect(w._state.complete)).to.equal(true)end)it("\115\104\111\117\108\100 \098\101 \101\120\097\099\116\108\121 \116\104\101 \103\111\097\108 \118\097\108\117\101 \119\104\101\110 \099\111\109\112\108\101\116\101\100",function()(expect(w._state.value)).to.equal(1)end)end)describe("\117\110\099\111\109\112\108\101\116\101\100 \115\116\097\116\101",function()local w=Q.new(0,false)local S=R.new(1,{velocity=1})w:setGoal(S)for Q=1,59,1 do w:step(.016666666666667)end it("\115\104\111\117\108\100 \098\101 \117\110\099\111\109\112\108\101\116\101",function()(expect(w._state.complete)).to.equal(false)end)end)describe("\110\101\103\097\116\105\118\101 \118\101\108\111\099\105\116\121",function()local w=Q.new(1,false)local S=R.new(0,{velocity=1})w:setGoal(S)for Q=1,60,1 do w:step(.016666666666667)end it("\115\104\111\117\108\100 \099\111\109\112\108\101\116\101",function()(expect(w._state.complete)).to.equal(true)end)it("\115\104\111\117\108\100 \098\101 \101\120\097\099\116\108\121 \116\104\101 \103\111\097\108 \118\097\108\117\101 \119\104\101\110 \099\111\109\112\108\101\116\101\100",function()(expect(w._state.value)).to.equal(0)end)end)end
return function()
	local SingleMotor = require(script.Parent.SingleMotor)
	local Linear = require(script.Parent.Linear)

	describe("completed state", function()
		local motor = SingleMotor.new(0, false)

		local goal = Linear.new(1, { velocity = 1 })
		motor:setGoal(goal)
	
		for _ = 1, 60 do
			motor:step(1/60)
		end
		
		it("should complete", function()
			expect(motor._state.complete).to.equal(true)
		end)

		it("should be exactly the goal value when completed", function()
			expect(motor._state.value).to.equal(1)
		end)
	end)

	describe("uncompleted state", function()
		local motor = SingleMotor.new(0, false)

		local goal = Linear.new(1, { velocity = 1 })
		motor:setGoal(goal)
	
		for _ = 1, 59 do
			motor:step(1/60)
		end
		
		it("should be uncomplete", function()
			expect(motor._state.complete).to.equal(false)
		end)
	end)

	describe("negative velocity", function()
		local motor = SingleMotor.new(1, false)

		local goal = Linear.new(0, { velocity = 1 })
		motor:setGoal(goal)
		
		for _ = 1, 60 do
			motor:step(1/60)
		end
		
		it("should complete", function()
			expect(motor._state.complete).to.equal(true)
		end)

		it("should be exactly the goal value when completed", function()
			expect(motor._state.value).to.equal(0)
		end)
	end)
end
