Skip to content

Commit

Permalink
Adds loop test
Browse files Browse the repository at this point in the history
  • Loading branch information
SinisterRectus committed Oct 12, 2020
1 parent 0a04e02 commit 3628d05
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/test-loop.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
return require('lib/tap')(function (test)

test("uv.loop_mode", function (print, p, expect, uv)
assert(uv.loop_mode() == nil)
local timer = uv.new_timer()
uv.timer_start(timer, 100, 0, expect(function ()
assert(uv.loop_mode() == "default")
uv.timer_stop(timer)
uv.close(timer)
end))
end)

end)

0 comments on commit 3628d05

Please sign in to comment.