return function()local f=require(script.Parent.instant)it("\115\104\111\117\108\100 \104\097\118\101 \116\104\101 \101\120\112\101\099\116\101\100 \065\080\073\115",function()local e=f(5);(expect(e)).to.be.a("\116\097\098\108\101");(expect(e.step)).to.be.a("\102\117\110\099\116\105\111\110")end)it("\115\104\111\117\108\100 \105\109\109\101\100\105\097\116\101\108\121 \099\111\109\112\108\101\116\101",function()local e={value=5,complete=false}local t=f(10)e=t:step(e,.001);(expect(e.value)).to.equal(10);(expect(e.complete)).to.equal(true)end)it("\115\104\111\117\108\100 \114\101\109\111\118\101 \101\120\116\114\097 \118\097\108\117\101\115 \102\114\111\109 \115\116\097\116\101",function()local e={value=5,complete=false,velocity=7;somethingElse={}}local t=f(10)e=t:step(e,.001);(expect(e.velocity)).to.never.be.ok();(expect(e.somethingElse)).to.never.be.ok()end)end
return function()
	local instant = require(script.Parent.instant)

	it("should have the expected APIs", function()
		local goal = instant(5)

		expect(goal).to.be.a("table")
		expect(goal.step).to.be.a("function")
	end)

	it("should immediately complete", function()
		local state = {
			value = 5,
			complete = false,
		}

		local goal = instant(10)
		state = goal:step(state, 1e-3)

		expect(state.value).to.equal(10)
		expect(state.complete).to.equal(true)
	end)

	it("should remove extra values from state", function()
		local state = {
			value = 5,
			complete = false,

			velocity = 7,
			somethingElse = {},
		}

		local goal = instant(10)
		state = goal:step(state, 1e-3)

		expect(state.velocity).to.never.be.ok()
		expect(state.somethingElse).to.never.be.ok()
	end)
end