local f=import("\046\047\115\112\097\119\110")local o=import("\046\046\047\084\097\115\107\083\099\104\101\100\117\108\101\114")describe("\116\097\115\107\070\117\110\099\116\105\111\110\115\046\115\112\097\119\110",function()it("\115\104\111\117\108\100 \115\099\104\101\100\117\108\101 \097\102\116\101\114 \097 \115\109\097\108\108 \097\109\111\117\110\116 \111\102 \116\105\109\101",function()local R=o.new()local j=f(R)local D=spy.new(function() end)j(function()D()end)R:step(.2);(assert.spy(D)).was_called()end)end)
local createSpawn = import("./spawn")
local TaskScheduler = import("../TaskScheduler")

describe("taskFunctions.spawn", function()
	it("should schedule after a small amount of time", function()
		local scheduler = TaskScheduler.new()
		local spawn = createSpawn(scheduler)

		local spy = spy.new(function() end)
		spawn(function() spy() end)
		scheduler:step(0.2)
		assert.spy(spy).was_called()
	end)
end)