karma-vca-api
v1.0.0
Published
A Karma plugin middleware that implements the VCA APIs
Downloads
5
Readme
karma-vca-api
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