Skip to content

Commit

Permalink
readme: fix simple-get example
Browse files Browse the repository at this point in the history
Closes #199
  • Loading branch information
reggi authored and bendrucker committed Aug 22, 2018
1 parent 8864361 commit cb725be
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ module.exports = function fetch (callback) {
```

```js
var proxyquire = require('proxyquire');
var proxyquire = require('proxyquire').noCallThru();
var assert = require('assert');

var fetch = proxyquire('./get', {
'simple-get': function (url, callback) {
process.nextTick(function () {
callback(null, fakeResponse)
callback(null, { statusCode: 200 })
})
}
});
Expand Down

0 comments on commit cb725be

Please sign in to comment.