karma-vca-api

1.0.0 • Public • Published

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

Package Sidebar

Install

npm i karma-vca-api

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • matt.clarkson
  • paul-maudsley
  • vca-build-server