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.3.0 to 1.3.1

2

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

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

@@ -15,5 +15,5 @@ /// <reference types="cypress" />

if (!it.each) {
it.each = (values) => {
it.each = function (values) {
return function (titlePattern, testCallback) {
values.forEach((value, k) => {
values.forEach(function (value, k) {
const testTitle = titlePattern.replace('%k', k).replace('%K', k + 1)

@@ -24,8 +24,12 @@

const title = formatTitle(testTitle, ...value)
it(title, testCallback.bind(null, ...value))
it(title, function itArrayCallback() {
return testCallback.apply(this, value)
})
} else {
const title = formatTitle(testTitle, value)
it(title, testCallback.bind(null, value))
it(title, function itCallback() {
return testCallback.call(this, value)
})
}
})
}, this)
}

@@ -36,3 +40,3 @@ }

if (!describe.each) {
describe.each = (values) => {
describe.each = function (values) {
return function describeEach(titlePattern, testCallback) {

@@ -39,0 +43,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