Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 1,000,000+ packages pre-installed, including jasmine-fail-fast with all npm packages installed. Try it out:

var jasmineFailFast = require("jasmine-fail-fast")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

jasmine-fail-fast v2.0.1

Allow Jasmine tests to "fail-fast", exiting on the first failure instead of running all tests no matter what.

jasmine-fail-fast build status

Allow Jasmine 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 running slow, expensive tests, such as Protractor e2e tests.

This module is a workaround to address the need for a fail-fast option in Jasmine, a feature that has been requested for years:


Inspired by, which doesn't seem to be working with Jasmine 2.x.


This module is implemented as a Jasmine reporter.

Jasmine as browser global

var failFast = require('jasmine-fail-fast');

Jasmine Node API

var Jasmine = require('jasmine');
var jasmine = new Jasmine();
var failFast = require('jasmine-fail-fast');



In the Karma configuration file:

module.exports = function(config) {
  var failFast = require('jasmine-fail-fast');


In the Protractor configuration file:

onPrepare: function() {
  var failFast = require('jasmine-fail-fast');

As a Jasmine helper

Create a new .js file within the helpers folder:

var failFast = require('jasmine-fail-fast');


Set up as a helper, optionally overriding the default helpers path.


RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free