s0ber/mock-async

Simple one-method library for mocking asynchronous methods

CoffeeScriptJavaScript
This is stars and forks stats for /s0ber/mock-async repository. As of 02 May, 2024 this repository has 3 stars and 0 forks.

Mock Async How to use Just mock an asynchronous method with this simple function. @getJSON = mockAsync($, 'getJSON') The first argument here is an object, and the second one is method name. Mocked method API will be returned. Here we've saved reference to it with @getJSON variable. Mock API Than we can make our mocked method to do what we want from it to do. MockApi.shouldSucceed(callback or value) Makes mocked method to resolve with specified result by default. @getJSON = mockAsync($, 'getJSON') @getJSON.shouldSucceed...
Read on GithubGithub Stats Page
repotechsstarsweeklyforksweekly
hellodigit/bondjsCoffeeScript1000
HermanMartinus/bearblogCSSJavaScriptPython1.8k0590
carderne/leaflet-gsheetsCSSJavaScriptHTML190880
akshat46/FlyingFoxCSSJavaScriptHTML1.5k0770
jvsell/dcw-appDockerfileJavaScript6080
github/haikus-for-codespacesEJSCSSJavaScript1.4k+62.9k+13
jacktasia/dumb-jumpEmacs LispGoShell1.5k01470
ossf/package-analysisGoPythonJavaScript6600470
grafana/tempoGoJsonnetMakefile3.3k04200
jonschoning/espialHaskellPureScriptPython6990230