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

cypress-each

Package Overview
Dependencies
Maintainers
1
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cypress-each - npm Package Compare versions

Comparing version 1.4.0 to 1.4.1

2

package.json
{
"name": "cypress-each",
"version": "1.4.0",
"version": "1.4.1",
"description": "Simple implementation for describe.each and it.each",

@@ -5,0 +5,0 @@ "main": "src",

# cypress-each ![cypress version](https://img.shields.io/badge/cypress-8.6.0-brightgreen) [![renovate-app badge][renovate-badge]][renovate-app] [![ci](https://github.com/bahmutov/cypress-each/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bahmutov/cypress-each/actions/workflows/ci.yml)
> A demo of mocha-each and custom describe.each and it.each implementation for Cypress
Read [Dynamic API Tests Using Cypress-Each Plugin](https://glebbahmutov.com/blog/dynamic-api-tests-using-cypress-each/)
## Blog posts
Find the implementation in [src/index.js](./src/index.js)
- [Dynamic API Tests Using Cypress-Each Plugin](https://glebbahmutov.com/blog/dynamic-api-tests-using-cypress-each/)
- [Refactor Tests To Be Independent And Fast Using Cypress-Each Plugin](https://glebbahmutov.com/blog/refactor-using-each/)

@@ -127,2 +128,4 @@ ## Install and use

Find the implementation in [src/index.js](./src/index.js)
- [it-spec.js](./cypress/integration/it-spec.js) uses no shortcuts to define multiple tests that are almost the same. We want to avoid the repetition

@@ -129,0 +132,0 @@ - [it-each-spec.js](./cypress/integration/it-each-spec.js) uses the `it.each` helper to generate multiple `it` tests given a data array

@@ -31,2 +31,6 @@ /// <reference types="cypress" />

it.each = function (values) {
if (!Array.isArray(values)) {
throw new Error('cypress-each: values must be an array')
}
return function (titlePattern, testCallback) {

@@ -61,2 +65,6 @@ values.forEach(function (value, k) {

describe.each = function (values) {
if (!Array.isArray(values)) {
throw new Error('cypress-each: values must be an array')
}
return function describeEach(titlePattern, testCallback) {

@@ -63,0 +71,0 @@ // define a test for each value

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