Skip to content

Instantly share code, notes, and snippets.

@jpulec
Created July 3, 2020 01:52
Show Gist options
  • Save jpulec/f507a1f245717dc6dcd76c5c0dee887e to your computer and use it in GitHub Desktop.
Save jpulec/f507a1f245717dc6dcd76c5c0dee887e to your computer and use it in GitHub Desktop.
MockRequest
import request from "request";
const myCoolFunction = (search, cb) => {
console.log(`Preparing to search for ${search}`);
request(`https://google.com/search/q=${search}`, cb);
}
export default myCoolFunction;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment