1.0.0 • Published 8 years ago

karma-vca-api v1.0.0

Weekly downloads
1
License
MIT
Repository
gitlab
Last release
8 years ago

karma-vca-api NPM version NPM downloads NPM license

A Karma plugin middleware that implements the VCA APIs

Installation

$ npm install --save-dev karma-vca-api

Usage

/* karma.conf.js */
module.exports = function(config) {
  config.set({
    /* Use the middleware */
    middleware: ['vca-api'],

    /* Passed to the Api constructor */
    vcaApi: {
      endpoint: '/test'
    }
  });
}

Resetting Between Tests

To provide a consistent testing environment it is useful for the API to be reset between tests. There are framework adaptors for popular testing frameworks that perform a POST request with the browsers Karma identification number to /karma-vca-api/api/reset so that the middleware data storage gets reset.

License

MIT © VCA Technology