Skip to content

moteus/lua-lluv-busted

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lluv-busted

Licence Build Status

Support async tests for busted with lluv library

Usage

local uv = require "lluv"

local loop = require "lluv.busted.loop"

loop.set_timeout(10)

setloop(loop)

describe("basic test", function()
  it('should pass', function(done) async()
    uv.timer():start(100, function()
      assert.is_true(true)
      done()
    end)
  end)

  it('should ignore unrefed handles', function(done) async()
    uv.timer():start(100, function()
      assert.is_true(true)
      done()
    end)
    uv.signal():start(uv.SIGINT, function() end):unref()
  end)

  it('should pass timeout', function(done) async()
    uv.timer():start(5000, function()
      assert.is_true(true)
      done()
    end)
  end)

  after_each(function()
    loop.verify_after()
  end)
end)

About

Support async tests for busted with lluv library

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published