项目作者: sigmasoldi3r

项目描述 :
Twire (Testing Wire) is a small suite of unit testing for OpenComputers
高级语言: Lua
项目地址: git://github.com/sigmasoldi3r/oc-twire.git
创建时间: 2017-10-16T21:10:09Z
项目社区:https://github.com/sigmasoldi3r/oc-twire

开源协议:MIT License

下载


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:

  1. local twire = require('twire');
  2. local describe = twire.describe;
  3. local it = twire.it;
  4. local assert = twire.assert;
  5. describe('what you\'re testing', function()
  6. -- Example of a test that will pass
  7. it('what it should do', function()
  8. assert.equals(5, 5);
  9. end);
  10. -- Example of test that will not
  11. it('should not pass this test', function()
  12. assert.isTrue(false);
  13. end);
  14. 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)