Socket
Socket
Sign inDemoInstall

@cypress/skip-test

Package Overview
Dependencies
Maintainers
1
Versions
14
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/skip-test - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

9

index.js

@@ -36,3 +36,3 @@ /// <reference path="./index.d.ts" />

*/
export const skipOn = (name, cb) => {
const skipOn = (name, cb) => {
if (!_.isString(name) || '') {

@@ -95,3 +95,3 @@ throw new Error(

*/
export const onlyOn = (name, cb) => {
const onlyOn = (name, cb) => {
if (!_.isString(name) || '') {

@@ -143,1 +143,6 @@ throw new Error(

Cypress.Commands.add('onlyOn', onlyOn)
module.exports = {
skipOn,
onlyOn
}
{
"name": "@cypress/skip-test",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple commands to skip a test based on platform, browser or an url",

@@ -5,0 +5,0 @@ "main": "index.js",

@@ -71,3 +71,3 @@ # @cypress/skip-test [![renovate-app badge][renovate-badge]][renovate-app] [![semantic-release][semantic-image] ][semantic-url] [![CircleCI](https://circleci.com/gh/cypress-io/cypress-skip-test/tree/master.svg?style=svg)](https://circleci.com/gh/cypress-io/cypress-skip-test/tree/master)

```js
import { onlyOn, skipOn } from '../..'
import { onlyOn, skipOn } from '@cypress/skip-test'

@@ -90,2 +90,3 @@ it('runs only on Mac', () => {

```js
import { onlyOn, skipOn } from '@cypress/skip-test'
onlyOn('mac', () => {

@@ -104,2 +105,13 @@ // this callback will only evaluate on Mac

**Tip:** you can nest the callbacks to combine the conditions
```js
// run these group of tests only on Mac and only on Chrome
onlyOn('mac', () => {
onlyOn('chrome', () => {
it('works', () => {})
})
})
```
### Notes

@@ -106,0 +118,0 @@

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