cf-smoke-test
v0.3.0
Published
Add smoke tests for article types in cf based webites
Downloads
13
Readme
cf-smoke test
Add smoke tests for article types in cf based webites.
Installation
npm install --save-dev cf-smoke-test
Usage
var SmokeTestRunner = require('cf-smoke-test')
// Pass in your application config
new SmokeTestRunner(config)
.add([ /* Test cases */ ])
.run()
// An example test case
{ type: 'article'
, bodyCheck: function (article, html, cb) {
// `article` is the entity from the API
// `html` is the response text from the site
// Do some checks to make sure the html is as expected,
// and callback with an error or null
// OK
cb(null)
// not OK
cb(new Error('This doesn’t look right, old chap!'))
}
}