Skip to content

Instantly share code, notes, and snippets.

@NimaSoroush
Created February 28, 2019 22:07
Show Gist options
  • Save NimaSoroush/f611dcdf8911b2d9e903267324214562 to your computer and use it in GitHub Desktop.
Save NimaSoroush/f611dcdf8911b2d9e903267324214562 to your computer and use it in GitHub Desktop.
Mocketeer with vanilla node
const mocketeer = require('mocketeer');
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
await mocketeer(browser);
await page.goto('https://www.example.com');
await page.close();
await browser.close();
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment