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.2.1 to 1.2.2

4

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

@@ -11,3 +11,3 @@ "main": "src",

"scripts": {
"lint": "tsc --pretty --allowJs --noEmit src/index.js cypress/integration/*.js",
"lint": "tsc --pretty --allowJs --strict --noEmit src/index.js cypress/integration/*.js",
"test": "cypress-expect run --expect cypress/expected.json",

@@ -14,0 +14,0 @@ "semantic-release": "semantic-release"

@@ -1,2 +0,2 @@

# cypress-each ![cypress version](https://img.shields.io/badge/cypress-8.5.0-brightgreen)
# cypress-each ![cypress version](https://img.shields.io/badge/cypress-8.5.0-brightgreen) [![renovate-app badge][renovate-badge]][renovate-app]
> A demo of mocha-each and custom describe.each and it.each implementation for Cypress

@@ -8,2 +8,36 @@

## Install and use
```
# install using NPM
$ npm i -D cypress-each
# install using Yarn
# yarn add -D cypress-each
```
Import `cypress-each` in a single spec or in Cypress support file
```js
import 'cypress-each'
// now can use describe.each and it.each
```
Let's create a separate test for each selector from a list
```js
import 'cypress-each'
// create a separate test for each selector
const selectors = ['header', 'footer', '.new-todo']
it.each(selectors)('element %s is visible', (selector) => {
cy.visit('/')
cy.get(selector).should('be.visible')
})
```
## Examples
- Watch [Using cypress-each To Create Separate Tests](https://youtu.be/utPKRV_fL1E)
- Read [Dynamic API Tests Using Cypress-Each Plugin](https://glebbahmutov.com/blog/dynamic-api-tests-using-cypress-each/)
## Specs

@@ -33,2 +67,18 @@

Include this module with other library types, like
```json
{
"compilerOptions": {
"types": ["cypress", "cypress-each"],
}
}
```
Or inside an individual spec file add
```js
/// <reference types="cypress-each" />
```
## Small print

@@ -74,1 +124,4 @@

OTHER DEALINGS IN THE SOFTWARE.
[renovate-badge]: https://img.shields.io/badge/renovate-app-blue.svg
[renovate-app]: https://renovateapp.com/
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