Skip to content

relekang/skip-if

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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)
})

About

skipIf(condition, name, test)

Resources

License

Stars

Watchers

Forks

Packages

No packages published