Constructs a new JestScreenshot
The options to pass to the instance of JestScreenshot
Sets up the JestScreenshot reporter
JestScreenshot reporter will have been initialiazed as a side effect for this test suite
Takes a screenshot of the current page
Either returns the response from Slack or the screenshot as a Buffer
Uploads screenshots to Slack using the provided token
base64 representation of the screenshot to upload
Promise of the SlackResponse
Generated using TypeDoc
The main class of JestScreenshot that should be initialized with config
Jest reporter plugin to take Puppeteer screenshots on failing tests
The Puppeteer page object to screenshot
The directory to create a "screenshots" folder in
An optional name of the script that is currently being ran
Optionally upload screenshots to slack after making them.
Requires you pass a token to the slackToken option, or set the SLACK_WEBTOKEN environment variable
Token to use when uploading to slack. Required when you pass slackUpload=true
Optionally you can also pass this through the environment variable "SLACK_WEBTOKEN".
This environment variable will take priority over passing it as option
Channels to send the Slack upload to
Should be an array of Slack channel IDs
Only used when slackUpload is set to true