cypress-each
Advanced tools
Comparing version 1.13.3 to 1.14.0
{ | ||
"name": "cypress-each", | ||
"version": "1.13.3", | ||
"version": "1.14.0", | ||
"description": "Simple implementation for describe.each and it.each", | ||
@@ -19,7 +19,7 @@ "main": "src", | ||
"devDependencies": { | ||
"cypress": "12.11.0", | ||
"cypress": "13.6.4", | ||
"cypress-expect": "2.5.3", | ||
"mocha-each": "^2.0.1", | ||
"prettier": "^2.4.1", | ||
"semantic-release": "21.0.2", | ||
"semantic-release": "23.0.2", | ||
"typescript": "^4.8.4" | ||
@@ -26,0 +26,0 @@ }, |
@@ -1,2 +0,2 @@ | ||
# cypress-each ![cypress version](https://img.shields.io/badge/cypress-12.11.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) | ||
# cypress-each ![cypress version](https://img.shields.io/badge/cypress-13.6.4-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) | ||
@@ -52,2 +52,12 @@ > A demo of mocha-each and custom describe.each and it.each implementation for Cypress | ||
## item index | ||
In addition to the item, the callback receives the index | ||
```js | ||
it.each(selectors)('element %s is visible', (selector, k) => { | ||
// k is 0, 1, 2, ... | ||
}) | ||
``` | ||
## Multiple arguments | ||
@@ -54,0 +64,0 @@ |
@@ -122,7 +122,7 @@ /// <reference types="cypress" /> | ||
it(title, function itArrayCallback() { | ||
return testCallback.apply(this, value) | ||
return testCallback.apply(this, value, k) | ||
}) | ||
} else { | ||
it(title, function itCallback() { | ||
return testCallback.call(this, value) | ||
return testCallback.call(this, value, k) | ||
}) | ||
@@ -129,0 +129,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
24358
437