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

@cypress/grep

Package Overview
Dependencies
Maintainers
0
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cypress/grep

Filter tests using substring

  • 4.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
185K
decreased by-28.87%
Maintainers
0
Weekly downloads
 
Created

What is @cypress/grep?

@cypress/grep is a plugin for Cypress that allows you to filter and run specific tests based on tags or regular expressions. This can be particularly useful for running subsets of tests in large test suites, improving test run times, and organizing tests more effectively.

What are @cypress/grep's main functionalities?

Tagging Tests

This feature allows you to tag your tests with specific labels and then run only the tests that match those tags. This is useful for running specific subsets of tests, such as smoke tests or regression tests.

```js
// In your test file
it('should do something important', { tags: ['smoke', 'regression'] }, () => {
  // test code here
});

// In your Cypress configuration or command line
cypress run --env grepTags=smoke
```

Filtering Tests with Regular Expressions

This feature allows you to filter and run tests based on a regular expression. This can be useful for running tests that match a specific pattern in their names or descriptions.

```js
// In your test file
it('should do something important', () => {
  // test code here
});

// In your Cypress configuration or command line
cypress run --env grep='important'
```

Combining Tags and Regular Expressions

This feature allows you to combine both tags and regular expressions to filter and run tests. This provides a more granular control over which tests to run, making it easier to manage large test suites.

```js
// In your test file
it('should do something important', { tags: ['smoke', 'regression'] }, () => {
  // test code here
});

// In your Cypress configuration or command line
cypress run --env grepTags=smoke --env grep='important'
```

Other packages similar to @cypress/grep

Keywords

FAQs

Package last updated on 02 Jul 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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