Socket
Socket
Sign inDemoInstall

mocha-pending-until-fixed

Package Overview
Dependencies
0
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

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.


Version published
Weekly downloads
2
decreased by-33.33%
Maintainers
1
Install size
5.47 kB
Created
Weekly downloads
 

Readme

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

Last updated on 16 May 2018

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc