Crossbones
Framework for writing tests once and running them under any test engine.
Currently, we only support conversion from Vows to Mocha. However, support for more frameworks is planned in the future.
Getting Started
Download crossbones.
In your web page:
Documentation
Skeleton exposes a constructor function to the window scope.
/** * Constructor for a Skeleton (test suite) * @param */
Test suites have the methods of addBatch
which is heavily based off of vows
/** * Method to add test batches to this test suite * @param * @param * @param * @param * @param * @returns */
and exportTo
.
/** * Run method for a test suite (currently only supporting Mocha) * @param * @returns */
New test engines can be added via Skeleton.addModule(name, fn)
.
If a function is asynchronous, it must have an asynchronous flag set on it (fn.SKELETON_ASYNC = true;
). Skeleton.async
is a helper method that will set this flag for you:
var myAsyncFn = Skeleton;myAsyncFnSKELETON_ASYNC; // true
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint your code via grunt.
Testing is currently done manually. You must serve the files locally (I suggest npm install -g serve && serve
). Then, you can test Skeleton and its module tests respectively. Test results should be viewed via the console.
License
Copyright (c) 2013 Ensighten Licensed under the MIT license.