Created
February 28, 2019 22:07
-
-
Save NimaSoroush/f611dcdf8911b2d9e903267324214562 to your computer and use it in GitHub Desktop.
Mocketeer with vanilla node
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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