Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

covet

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

covet

Dynamically build and tear-down tests' API responses using XHRs

  • 0.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

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

FAQs

Package last updated on 20 Sep 2013

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc