Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bas080/lunit

Test your Lua code by writting tests in Lua
https://github.com/bas080/lunit

Last synced: 21 days ago
JSON representation

Test your Lua code by writting tests in Lua

Awesome Lists containing this project

README

        

Lunit
=====
Write tests for your lua code.

Usage
-----
*example taken from the tests.lua*
```lua
lunit.tests( 'lunit', function( unit )

unit.ok( true, 'true is ok')
unit.ok( 'string', 'string is ok')
unit.ok( '', 'empty string is ok')
unit.ok( {}, 'table is ok')
unit.ok( not nil, 'nil is not ok')
unit.ok( not false, 'false is not ok')

unit.equal( true, true, 'equals true')
unit.equal( false, false, 'equals false')
unit.equal( 'hello', 'hello', 'equals string')
unit.equal( type(''), 'string', 'check type')

end)
```

Roadmap
-------
- deep equals for testing table outputs
- asynchronous tests