Testly is a testing library built for simplicity and usefulness.
Testly is an agile and polyglot testing framework. This is the NodeJS implementation.
Here is a basic example:
var i = 0;suitename"Basic";suiteiniti++;;suitedefine"Passing Test"test.asserti == 1;;suitedefine"Failing Test"testshouldFailtestfail;;;suitedefine"Assertion Test"test.assert5 == 5;test.assert"Hello" == "Hello";test.assert"Go" != "No";test.assert"LOL"toLowerCase == "lol";;;
A suite is a set of tests. Each file where tests are is a separate suite.
name: Gets/Sets the name of the suite
init: Pass a function to this function and it will be run before any tests are executed.
define: Defines a new test - args:
test object is passed to each test function as a utility belt :)
assert: Asserts that the input is
shouldFail: Assertions or Errors are ignored in functions passed to it
fail: Fails the Test
exec: Executes a process - (uses shelljs's
shell: shelljs shorthand
log: String passed to this function will be recorded in the test reports
test.assert is a function that can be used like normal test assertions.
test.assert also adds the
assert module's functions onto it, so it can be used like:
Please file any bugs on the GitHub Issue Tracker.