An opinionated and lightweight testing framework
an opinionated and lightweight testing framework for the browser and node.js
npm install -g testla
testla [FILE, ...]
Running individual tests
testla file1-test.js file2-test.js
Running all tests in folder
Similar to node.js
Other included matchers
dependencies.js file export a function which returns an object
literal of dependencies. Here you can use
assert.extend() to create your own
assertextendassertequala b messagereturnmyDep: 1otherDependency: 'hello'
Spies are useful for hooking into functions and asserting that they have been called and with the correct parameters.
To work with spies just include
spy in your test function's parameters.
var obj =var mySpy = spyonobj 'foo'objfoo'bar'mySpy.assert'bar'
Relies on promises to provide asynchronous tests. One can
reject or fail the
resolve/complete the test. Returning the promise is essential to mark
the test as asynchronous and inform testla to wait for the test to finish.