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.6.0 to 1.7.0

2

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

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

@@ -8,6 +8,8 @@ # cypress-each ![cypress version](https://img.shields.io/badge/cypress-8.7.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)

- [Refactor Tests To Be Independent And Fast Using Cypress-Each Plugin](https://glebbahmutov.com/blog/refactor-using-each/)
- [Test your sitemap using Cypress](https://glebbahmutov.com/blog/test-sitemap/)
## Videos
- Watch [Using cypress-each To Create Separate Tests](https://youtu.be/utPKRV_fL1E)
- [Using cypress-each To Create Separate Tests](https://youtu.be/utPKRV_fL1E)
- [Test Each URL From Sitemap In Its Own Separate Cypress Test](https://youtu.be/qkofPocd7lY)

@@ -114,2 +116,11 @@ ## Install and use

You can use `%N` to insert the total number of items
```js
it.each(['first', 'second'])('test %K of %N', (x) => { ... })
// creates the tests
// "test 1 of 2"
// "test 2 of 2"
```
### Title function

@@ -116,0 +127,0 @@

@@ -35,3 +35,6 @@ /// <reference types="cypress" />

if (typeof titlePattern === 'string') {
const testTitle = titlePattern.replace('%k', k).replace('%K', k + 1)
const testTitle = titlePattern
.replace('%k', k)
.replace('%K', k + 1)
.replace('%N', values.length)
if (Array.isArray(value)) {

@@ -70,3 +73,2 @@ return formatTitle(testTitle, ...value)

values.forEach(function (value, k) {
// const testTitle = titlePattern.replace('%k', k).replace('%K', k + 1)
const title = makeTitle(titlePattern, value, k, values)

@@ -118,3 +120,2 @@ if (!title) {

values.forEach((value, k) => {
// const testTitle = titlePattern.replace('%k', k).replace('%K', k + 1)
const title = makeTitle(titlePattern, value, k, values)

@@ -140,2 +141,2 @@

module.exports = { formatTitle, getChunk }
module.exports = { formatTitle, makeTitle, getChunk }
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