Instruct a remote Express app to stub APIs via HTTP requests
CoffeeScript JavaScript
Switch branches/tags
Nothing to show
Latest commit d470da5 Sep 20, 2013 @searls searls 0.0.3
Permalink
Failed to load latest commit information.
config
lib
spec
tasks
.gitignore
.npmignore
.travis.yml
Gruntfile.js
README.md
main.js
package.json

README.md

Covet

Build Status

Covet is a node module that creates or receives an express application and defines a few routes that enable users to dynamically add new routes to the app (and then tear down those dynamic routes when needed).

The use case for this is almost exclusively integration tests which cross an HTTP boundary. When a test needs a way to stub a response to a particular request on a remote server, Covet provides a way to do it using HTTP.

api

The API is in progress. Check out the primary integration spec for examples.

Running the tests

$ npm install -g lineman
$ npm install
$ lineman spec --stack

Should give you output in TAP13 like this:

Running "spec:files" (spec) task
1..12
ok 1 covet stubbing static GET route gets the bunny
ok 2 covet stubbing tearing down the previous example group successfully tears down to prevent test pollution
ok 3 covet stubbing dynamic, conditional GET route with an ID satisfied stubbing gets bunny
ok 4 covet stubbing dynamic, conditional GET route with an ID unsatisfied stubbings get nothing
ok 5 covet stubbing dynamic, conditional GET route with an ID and an Age satisfied stubbing gets bunny
ok 6 covet stubbing dynamic, conditional GET route with an ID and an Age unsatisfied stubbings get nothing
ok 7 covet stubbing dynamic, conditional POST route with an ID and an Age satisfied stubbing gets bunny
ok 8 covet stubbing dynamic, conditional POST route with an ID and an Age unsatisfied stubbings get nothing
ok 9 covet stubbing dynamic, conditional PUT route with an ID and an Age satisfied stubbing gets bunny
ok 10 covet stubbing dynamic, conditional PUT route with an ID and an Age unsatisfied stubbings get nothing
ok 11 covet stubbing dynamic, conditional DELETE route with an ID and an Age satisfied stubbing gets bunny
ok 12 covet stubbing dynamic, conditional DELETE route with an ID and an Age unsatisfied stubbings get nothing
# tests 12
# pass 12
# fail 0