noop(); pop(); map();

    jest-screenshot-reporter

    0.1.0 • Public • Published

    jest-screenshot-reporter

    Capture screenshots as a report for failed tests on Selenium WebDriver.

    npm install --save-dev jest-screenshot-reporter
    

    Usage

    While Jest reporters mechanism does not allow doing stuff after each test, the screenshot reporter should be added to Jasmine config.

    Create a file for Jasmine configuration:

    const JestScreenshotReporter = require('jest-screenshot-reporter');
    jasmine.getEnv().addReporter(new JestScreenshotReporter({ browser }));
    

    And add it Jest config:

    "setupTestFrameworkScriptFile": "./jasmine.config.js",
    

    Reporter API

    The reporter receives next options when instantiating via new JestScreenshotReporter({ ... }):

    • browser — global WebDriver instance that is introduced by jest-environment-webdriver
    • savePath — path to the screenshots destination folder. Default is ./reports/screenshots

    Keywords

    none

    Install

    npm i jest-screenshot-reporter

    DownloadsWeekly Downloads

    44

    Version

    0.1.0

    License

    MIT

    Last publish

    Collaborators

    • alexeyraspopov