Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/virgo-agent-toolkit/luvit-tape
TAP tests for Luvit!
https://github.com/virgo-agent-toolkit/luvit-tape
Last synced: 3 months ago
JSON representation
TAP tests for Luvit!
- Host: GitHub
- URL: https://github.com/virgo-agent-toolkit/luvit-tape
- Owner: virgo-agent-toolkit
- License: apache-2.0
- Created: 2014-06-02T21:05:47.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2014-08-26T16:31:49.000Z (about 10 years ago)
- Last Synced: 2024-04-13T22:04:16.270Z (7 months ago)
- Language: Lua
- Homepage:
- Size: 781 KB
- Stars: 7
- Watchers: 14
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
luvit-tape
==========TAP-producing test tool for Luvit
Example
-------
```lua
local test = require('..')("name of test suite")test("My awesome test", nil, function(t)
t:is_nil(nil, "nil should be nil")
t:not_nil({}, "{} should not be nil")
t:is_number(1, "1 should be a number")
t:is_string("hello", "hello should be a string")
t:is_table({}, "{} should not be a table")
t:is_boolean(true, "true should b3 a boolean")
t:is_array({1, 2, 3}, "{1, 2, 3} should be an array")
t:equal({a = {1,2,3}, b = true, c = 'haha'}, {a = {1,2,3}, b = true, c = 'haha'}, "two tables should be same")
t:finish()
end)test("My super skipped test", nil, function(t)
if true ~= false then
t:skip("true is not equal to false!")
endt:equal(1 + 1, 3)
t:finish()
end)test("My super awesome test", nil, function(t)
t:is_number(42, "42 should be a number")
t:equal({a = {1,2,3, 4}, b = true, c = 'haha'}, {a = {1,2,3}, b = true, c = 'haha'}, "are the two tables same?")
t:finish()
end)test("test case suffering from procrastination", nil, function(t)
t:todo("goto a parallel universe")
end)
```