Socket
Book a DemoInstallSign in
Socket

@cucumber/tag-expressions

Package Overview
Dependencies
Maintainers
2
Versions
17
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cucumber/tag-expressions

Cucumber Tag Expression parser

latest
Source
npmnpm
Version
6.2.0
Version published
Weekly downloads
1.8M
-1.49%
Maintainers
2
Weekly downloads
 
Created

What is @cucumber/tag-expressions?

@cucumber/tag-expressions is a package that allows you to evaluate tag expressions, which are commonly used in Cucumber to filter scenarios based on tags. This is useful for running specific subsets of tests based on tags.

What are @cucumber/tag-expressions's main functionalities?

Evaluate Simple Tag Expressions

This feature allows you to evaluate simple tag expressions to determine if a set of tags matches the expression. In this example, the expression '(@smoke or @regression) and not @wip' is parsed and evaluated against the tags ['@smoke'], resulting in true.

const { parse } = require('@cucumber/tag-expressions');
const expression = parse('(@smoke or @regression) and not @wip');
const matches = expression.evaluate(['@smoke']); // true
console.log(matches);

Evaluate Complex Tag Expressions

This feature allows you to evaluate more complex tag expressions. In this example, the expression '(@smoke and @fast) or (@regression and not @slow)' is parsed and evaluated against the tags ['@smoke', '@fast'], resulting in true.

const { parse } = require('@cucumber/tag-expressions');
const expression = parse('(@smoke and @fast) or (@regression and not @slow)');
const matches = expression.evaluate(['@smoke', '@fast']); // true
console.log(matches);

Evaluate Tag Expressions with Multiple Tags

This feature allows you to evaluate tag expressions against a set of multiple tags. In this example, the expression '@smoke and @fast' is parsed and evaluated against the tags ['@smoke', '@fast', '@ui'], resulting in true.

const { parse } = require('@cucumber/tag-expressions');
const expression = parse('@smoke and @fast');
const matches = expression.evaluate(['@smoke', '@fast', '@ui']); // true
console.log(matches);

Other packages similar to @cucumber/tag-expressions

Keywords

cucumber

FAQs

Package last updated on 25 May 2025

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