Testing Wire
Twire is a small suite of unit testing for OpenComputers
The philosophy of twire is to keep things simple, so it's usage is far simple:
local twire = require('twire');
local describe = twire.describe;
local it = twire.it;
local assert = twire.assert;
describe('what you\'re testing', function()
-- Example of a test that will pass
it('what it should do', function()
assert.equals(5, 5);
end);
-- Example of test that will not
it('should not pass this test', function()
assert.isTrue(false);
end);
end);
- Add nested describe (At the moment you can nest them, but it will show bad formatted)
- Add a module that exposes directly functions to global scope
- More asserts
- Document the API
- Count the delay of the tests and warn about it
- Count the total of specs that passed or failed
- Exit non zero if some spec fails (Ideal for test runners)