https://github.com/bas080/lunit
Test your Lua code by writting tests in Lua
https://github.com/bas080/lunit
Last synced: about 1 year ago
JSON representation
Test your Lua code by writting tests in Lua
- Host: GitHub
- URL: https://github.com/bas080/lunit
- Owner: bas080
- License: other
- Created: 2015-02-08T19:43:02.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-02-08T20:03:05.000Z (about 11 years ago)
- Last Synced: 2025-02-01T20:12:21.319Z (about 1 year ago)
- Language: Lua
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
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