Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Fixes #19 - Allow executing puppeteer commands from mocha tests. #24

Merged
merged 1 commit into from
Sep 22, 2017

Conversation

austinkelleher
Copy link
Collaborator

Implements a window.puppeteerCommand(...) function that can be used in the mocha tests.

describe('screenshot test', function () {
  it('should take a screenshot', async () => {
    await window.puppeteerCommand({
      type: 'screenshot', // The page command to run
      args: [ {           // The arguments that should be passed to the page command
        path: './test.png'
      } ]
    })
  })
})

@coveralls
Copy link

Coverage Status

Coverage increased (+0.06%) to 98.841% when pulling 68ada77 on 19-commands into 3c7677d on master.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants