Introducing Socket Firewall: Free, Proactive Protection for Your Software Supply Chain.Learn More
Socket
Book a DemoInstallSign in
Socket

github-stub

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

github-stub

Sinon stubbed node-github look-alike that can also check if you called it with proper arguments and has convenience functions to defined behavior.

latest
Source
npmnpm
Version
3.2.0
Version published
Maintainers
1
Created
Source

github-stub

Build Status Greenkeeper badge codecov

Exports a sinon stub version of the node github client. It also exposes a function to check the stubs were called with valid parameters.

argumentsValid

Every stub has an additional method called argumentsValid. It takes an assertion function as first parameter. The assertion callback should take a truthy value as first parameter and a message as second parameter. The second parameter is an optional sinon spy call to assess.

There is a method on the top level client object with the same name and signature that will call argumentsValid on every API method that was called.

allArgumentsValid

Same as argumentsValid but for every call of the stub.

This is also available on the top level client object.

reset

The top level client object has a reset method that calls reset on every stub it contains.

License

This package is licensed under the MIT license.

Keywords

github

FAQs

Package last updated on 10 Nov 2018

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