skip-if

1.1.1 • Public • Published

skipIf(condition, name, test)

A small helper to make dynamic decisions on whether to skip tests. This might be useful in situations where a test is only applicable for certain environments.

Installation

npm install --save-dev skip-if # or yarn add --dev skip-if 

Usage

const skipIf = require('skip-if');
 
skipIf(process.platform === 'darwin', 'test only for macOs', () => {
  expect(true).toBe(true)
})
 
// currying is also possible
const skipIfMac = skipIf(process.platform === 'darwin')
skipIfMac('test only for macOs', () => {
  expect(true).toBe(true)
})

/skip-if/

    Package Sidebar

    Install

    npm i skip-if

    Weekly Downloads

    118

    Version

    1.1.1

    License

    MIT

    Unpacked Size

    95.7 kB

    Total Files

    8

    Last publish

    Collaborators

    • relekang