LaxarJS Testing Build Status

The companion testing framework for LaxarJS widgets.

Use it on top of Jasmine to setup and load a widget just like in an actual application. The available APIs then support you in instrumenting and inspecting the widget under test.

For an introduction to LaxarJS Testing have a look at the manuals. Additionally the API docs provide detailed information on the configuration, instrumentation and inspection possibilities.

Installation

Your LaxarJS application might have been created from a template that already includes laxar-testing (check your bower_components folder). If not, follow these steps:

  1. Install laxar-testing as a Bower dependency:
bower install --save-dev laxar-testing
  1. Add the necessary entries to your RequireJS configuration (require_config.js), assuming that your baseUrl is 'bower_components':
paths: {
   // requirejs, laxar, angular, angular-mocks...

   // laxar-testing specific paths:
   'laxar-testing': 'laxar-testing/dist/laxar-testing',
   jasmine2: 'jasmine2/lib/jasmine-core/jasmine',
   'promise-polyfill': 'promise-polyfill/Promise'
}

Note that Jasmine 2 is installed by Bower into its own directory to support different versions of jasmine to be used by different widgets.