Skip to content
This repository has been archived by the owner on Jan 30, 2019. It is now read-only.
/ github-stub Public archive

Use hooks in @octokit/rest instead of this. Was: Sinon stubbed @octokit/rest look-alike that can also check if you called it with proper arguments and has convenience functions to defined behavior.

License

Notifications You must be signed in to change notification settings

freaktechnik/github-stub

Repository files navigation

Use hooks in @octokit/rest instead of this.

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.

About

Use hooks in @octokit/rest instead of this. Was: Sinon stubbed @octokit/rest look-alike that can also check if you called it with proper arguments and has convenience functions to defined behavior.

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published