Product
Introducing SSO
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
covet
Advanced tools
Readme
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.
The API is in progress. Check out the primary integration spec for examples.
$ 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
Dynamically build and tear-down tests' API responses using XHRs
The npm package covet receives a total of 3 weekly downloads. As such, covet popularity was classified as not popular.
We found that covet demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Streamline your login process and enhance security by enabling Single Sign-On (SSO) on the Socket platform, now available for all customers on the Enterprise plan, supporting 20+ identity providers.
Security News
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.