Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mocha-proshot

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mocha-proshot

Mocha reporter that takes screenshot after protractor tests

  • 1.0.1
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.4K
decreased by-16.02%
Maintainers
1
Weekly downloads
 
Created
Source

mocha-proshot

A reporter for mocha that takes a screenshot after each failed Protractor test. The filename will be derived from the name of the failed test.

Installation

npm install --save-dev mocha-proshot

Usage

Use the environment variable PROSHOT_DIR to specify the base directory for all screenshots.

Simply update your Protractor configuration file to set the screenshot path and specify mocha-proshot as your reporter:

'use strict';

process.env.PROSHOT_DIR = './reports/screenshots';

exports.config = {
	...
    framework: 'mocha',
    mochaOpts: {
        reporter: 'mocha-proshot'
    },
	...
};

You probably want to use mocha-multi to get your usual test reports alongside the screenshots:

'use strict';

process.env.PROSHOT_DIR = './reports/screenshots';
process.env.multi = 'spec=- mocha-proshot=-'; // See 'mocha-multi' for configuration details

exports.config = {
	...
    framework: 'mocha',
    mochaOpts: {
        reporter: 'mocha-multi'
    },
	...
};

Caveat: mocha-multi does not work together with Protractor's sharding feature because the latter depends on some internals of builtin mocha reporters that mocha-multi does not emulate. Use mocha-proshot directly if you depend on sharding. See issue #1 for details.

Keywords

FAQs

Package last updated on 04 Sep 2015

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc