Skip to content

Twire (Testing Wire) is a small suite of unit testing for OpenComputers

License

Notifications You must be signed in to change notification settings

sigmasoldi3r/oc-twire

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Twire

Testing Wire

What is twire?

Twire is a small suite of unit testing for OpenComputers

twire in action

Simple to use

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);

Planned to-do:

  • 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)

About

Twire (Testing Wire) is a small suite of unit testing for OpenComputers

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages