Options
All
  • Public
  • Public/Protected
  • All
Menu

The main class of JestScreenshot that should be initialized with config

remarks

Jest reporter plugin to take Puppeteer screenshots on failing tests

param

The Puppeteer page object to screenshot

param

The directory to create a "screenshots" folder in

param

An optional name of the script that is currently being ran

param

Optionally upload screenshots to slack after making them.

Requires you pass a token to the slackToken option, or set the SLACK_WEBTOKEN environment variable

param

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

param

Channels to send the Slack upload to

Should be an array of Slack channel IDs

Only used when slackUpload is set to true

Hierarchy

  • JestScreenshot

Index

Constructors

constructor

Methods

setup

  • setup(): Promise<void>
  • Sets up the JestScreenshot reporter

    Returns Promise<void>

    JestScreenshot reporter will have been initialiazed as a side effect for this test suite

takeScreenshot

uploadToSlack

  • uploadToSlack(screenshot: Buffer, fileName: string): Promise<SlackResponse>

Generated using TypeDoc