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

protractor-fail-fast

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

protractor-fail-fast

Allow Protractor tests to "fail-fast", exiting on the first failure instead of running all tests no matter what. This can save a great deal of time as Protractor tests are typically slow and expensive.

  • 3.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
6.5K
increased by6.98%
Maintainers
1
Weekly downloads
 
Created
Source

protractor-fail-fast

Allow Protractor tests to "fail-fast", exiting on the first failure instead of running all tests no matter what. This can save a great deal of time as Protractor tests are typically slow and expensive.

This Protractor plugin is effectively a wrapper around jasmine-fail-fast.

Install

yarn

yarn add protractor-fail-fast

npm

npm install protractor-fail-fast

Fail file

Since test runners run in independent processes, we use a "fail file", .protractor-fail-fast, to communicate between them (better ideas welcome). The "fail file" is created when the plugin is initialized and the test runners then continuously check for the presence of it. If/when a test runner fails, it will delete the "fail file", signaling to the other test runners to stop the test run.

It is recommended that .protractor-fail-fast is added to .gitignore since this file may be left behind if all test runners finish successfully. It can removed in the afterLaunch (see below), but could still be left behind if Protractor is shut down prior to executing the hook (crash/forced exit).

Usage

Inside the Protractor config file:

import failFast from 'protractor-fail-fast';

exports.config = {
  plugins: [
    failFast.init(),
  ],
  
  // Optional
  afterLaunch: function() {
    failFast.clean(); // Removes the fail file once all test runners have completed.
  },
}

FAQs

Package last updated on 12 Mar 2018

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