Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/bas080/lunit
- Owner: bas080
- License: other
- Created: 2015-02-08T19:43:02.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2015-02-08T20:03:05.000Z (almost 10 years ago)
- Last Synced: 2023-03-25T10:17:41.475Z (almost 2 years ago)
- Language: Lua
- Homepage:
- Size: 97.7 KB
- Stars: 0
- Watchers: 1
- 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