Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('sets up puppeteer and takes a screen shot of the given repos homepage when its defined', async () => {
const result = await script(scriptArgs)
expect(puppeteer._browser.newPage).toHaveBeenCalled()
expect(puppeteer._page.setViewport).toHaveBeenCalledWith({
width: 1400,
height: 1080,
})
expect(puppeteer._page.goto).toHaveBeenCalledWith('homepage.com')
expect(puppeteer._page.screenshot).toHaveBeenCalledWith({
path: path.join(
__dirname,
'tmp/Examples/graphql.explore-tech.org/screenshot.png'
),
})
})