https://github.com/moteus/lua-lluv-busted
Support async tests for busted with lluv library
https://github.com/moteus/lua-lluv-busted
async lua test testing
Last synced: 9 months ago
JSON representation
Support async tests for busted with lluv library
- Host: GitHub
- URL: https://github.com/moteus/lua-lluv-busted
- Owner: moteus
- License: mit
- Created: 2017-01-26T14:35:12.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2017-01-31T12:05:23.000Z (about 9 years ago)
- Last Synced: 2025-02-02T00:27:25.716Z (about 1 year ago)
- Topics: async, lua, test, testing
- Language: Lua
- Size: 8.79 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# lluv-busted
[](LICENSE)
[](https://travis-ci.org/moteus/lua-lluv-busted)
Support async tests for busted with lluv library
#### Usage
```Lua
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)
```