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

mocha-pending-until-fixed

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-pending-until-fixed

Marks a mocha test as "pending until fixed", which skips if the test fails, but throws if the test succeeds.

  • 0.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

mocha-pending-until-fixed

Marks a mocha test as "pending until fixed", which skips if the test fails, but throws if the test succeeds.

This helper function is influenced by ScalaTest's pendingUntilFixed, so I will simply quote them:

This [function] can be used to temporarily change a failing test into a pending test in such a way that it will automatically turn back into a failing test once the problem originally causing the test to fail has been fixed. At that point, you need only remove the pendingUntilFixed call. In other words, a pendingUntilFixed surrounding a block of code that isn't broken is treated as a test failure. The motivation for this behavior is to encourage people to remove pendingUntilFixed calls when there are no longer needed.

Installation

yarn add -D mocha-pending-until-fixed

or

npm i -D mocha-pending-until-fixed

Usage

Simply wrap the lowest level function in your mocha test callback with pendingUntilFixed:

import pendingUntilFixed from 'mocha-pending-until-fixed';

describe('SomeFunction', () => {
  it('does a thing', pendingUntilFixed(() => {
    expect(false).to.be.true;
  }));
});

Keywords

FAQs

Package last updated on 16 May 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